#1159 Stream command "query exists" ans sysfiletree return false positives


under windows xp, when querying the existence of files using illegal chars in file names, the stream command "query exists" gives false positives when the file without the illegal chars does exist. Same applies to the sysfiletree function.

The following script is the only file in c:\temp\test\:

parse source . . me .
say 'expect file name :'me
say 'expect file name :'.Stream~new(me)~command('query exists')
say 'expect empty string:'.Stream~new(me || '?<>')~command('query exists')
say 'expect empty string:'stream(me || '?<>
', 'command', 'query exists')
call sysfiletree '.?<>', 'files', 'F'
say 'expect file count=0:'files.0
say 'expect uninit var :'files.1

and gives following result:

expect file name :C:\temp\test\me.rex
expect file name :C:\temp\test\me.rex
expect empty string:C:\temp\test\me.rex?<>
expect empty string:C:\temp\test\me.rex?<>

expect file count=0:1
expect uninit var : 2/07/13 11:22p 385 A---- C:\temp\test\me.rex

C:\temp\test>rexx -v
Open Object Rexx Version 4.1.2
Build date: Aug 28 2012
Addressing Mode: 32

Copyright (c) IBM Corporation 1995, 2004.
Copyright (c) RexxLA 2005-2012.
All Rights Reserved.
This program and the accompanying materials are made available under
the terms of the Common Public License v1.0 which accompanies this
distribution or at


  • mukenx

    mukenx - 2013-02-07

    after sending this, I noticed that the 4th illegal char I had also appended is missing: the star character.

  • mukenx

    mukenx - 2013-02-08

    for completeness

  • Rick McGuire

    Rick McGuire - 2013-11-22
    • Group: 4.1.2 --> v4.2.0
  • Rick McGuire

    Rick McGuire - 2013-11-23
    • status: open --> accepted
    • assigned_to: Rick McGuire
    • Pending work items: none --> code
  • Rick McGuire

    Rick McGuire - 2013-11-23

    stream query exists fix committed [r9552]



    Commit: [r9552]

  • Mark Miesfeld

    Mark Miesfeld - 2013-11-28
    • status: accepted --> pending
    • Pending work items: code --> complete
  • Mark Miesfeld

    Mark Miesfeld - 2013-11-28

    Committed revision 9575. [r9575] code trunk
    Committed revision 9576. [r9576] add basic SysFileTree test group
    Committed revision 9577. [r9577] update doc
    Committed revision 9578. [r9578] code 4.1 fixes

    The Windows API that lists files will not use invalid file name characters. Instead it changes invalid file name characters to '*', '?', and '.' SysFileTree will return an error code and the files stem will have the .0 stem set to 0 if the file spec string has illegal characters in it.



    Commit: [r9575]
    Commit: [r9576]
    Commit: [r9577]
    Commit: [r9578]

  • Rick McGuire

    Rick McGuire - 2014-04-15
    • status: pending --> closed


Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks