Menu

#1613 SysFileSearch does not set return code to 0 when successful.

5.0.0
closed
nobody
none
1
2023-01-01
2019-03-19
Mark Harsen
No

64-bit OOREXX 5.0.0 build 11844 on Windows 10

A successful execution of "SysFileSearch" is not setting a numeric return code of zero ("0") as it should but instead it is returning an empty string "".

Address "CMD" "DIR /B" Directory ">" WorkFile "2>&1"
Rc = SysFileSearch(Ext, MyWorkFile, "List.")
Say "Rc={"Rc"}"

The above program displays "{}" since "Rc" contains an empty string but it should display "{0}" since execution was successful: the stem "List." contains the proper values including "List.0" which has the correct number of items (95) in a production execution.

Not that it should matter, but in the failed instance in my production code, the variables had the following value:

Ext = ".rex"
Directory = "C:\bin\Thor\Procedures"
WorkFile = "C:\bin\Thor\Work\code.mharsen.81.txt"

Thanks, Mark

Discussion

  • Mark Harsen

    Mark Harsen - 2019-03-19

    I mixed two examples, sorry: "MyWorkFile" should just be "WorkFile" above.

     
  • Erich

    Erich - 2019-03-19
    • status: open --> pending
     
  • Erich

    Erich - 2019-03-19

    fix committed with revision [r11846]

     

    Related

    Commit: [r11846]

  • Erich

    Erich - 2019-05-01

    another SysFileSearch return code fix for invalid files on Unix committed with revision [r11876]

     

    Related

    Commit: [r11876]

  • Erich

    Erich - 2019-05-01

    On Wed, May 1, 2019 at 3:09 PM Rick McGuire object.rexx@gmail.com wrote:
    You might want to perform the directory test first. Done this way, the code will exit with a an open file.

    committed a fix for theSysFileSearch return code fix with revision [r11877].

     

    Related

    Commit: [r11877]

  • Rony G. Flatscher

    • Status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel