I've got a fix for this for stream query exists, but could you take a look at
the sysfiletree problem?  I'm not convinced this is actually a bug, but a quirk
of how FindFirstFile works on Windows with wildcard characters.   The stream
query exists problem was occurring because FindFirstFile was being used to
verify the existence, using an already fully qualified name. 



 Definitely a place  to tread with care ...my isDir and isFile routines go
through some 'hoops'   ... suggest we discuss if any changes planned.


Okay, I'll list any SysFileTree() changes planned in this thread.  Are your
routines using SysFileTree() or some other mechanism?

They used to use stream (query exists) but something was flaky there on some
kinds of disks, I think (this was a few years ago).  My current 'core routine'
uses sysfiletree, with the following comment and code.   I don't recall why it
cannot be used to test for root directory (the old one could be used for that
and was the way I tested whether a disk was present).
 
Mike
 
/* --------------------------------------------------------------- */
/* Return 1 if file or directory exists, 0 otherwise               */
/* --------------------------------------------------------------- */
/*                                                                 */
/*   Arg1 is fully qualified file or directory name to test        */
/*                                                                 */
/* A file of size 0 is deemed not to exist.                        */
/* Note this cannot be used to test for root directory.            */
/* --------------------------------------------------------------- */
-- 'query exists' doesn't work for directories
exists:
  parse arg spec
  call sysfiletree spec, 'LIST', 'BL'
  if list.0\=1 then return 0            -- does not exist
  parse var list.1 . . size flags .
  if size>0 then return 1               -- real file
  return substr(flags, 2, 1)='D'        -- 1 if directory, 0 if zero-size file

 
 

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to