Dear Developers,

When working on modifying FileUtils.cls to work also for macOS/Darwin I used (by mistake, certainly) SysFileTree() with an invalid path and was astonished to see that it nevertheless produced a valid result. Is this intended?

This is what I intended to do:

installDir = '/Users/po/Applications/ooRexx5.0.0‘
name = 'rexx'
j = SysFileTree(installDir'/bin/'name, f., 'FOS')

But instead I did (note the trailing slash)

installDir = '/Users/po/Applications/ooRexx5.0.0/‘
name = 'rexx'
j = SysFileTree(installDir'/bin/'name, f., 'FOS')

This produces a „//„ in the path, i.e. an illegal path

Nevertheless SysFileTree() „corrected“ my input path, removed the additional slash and gave me the correct path back as f.1.

I also tried on Windows and there SysFileTree() considers a path with double backslash to be correct (return value 0), but the output is not corrected as on MAC.

I have attached two scripts to show the behavior , amend to fit your installation and have a try. I did not investigate on Linux/Unix.

Attachment: Mactest.rex
Description: Binary data

Attachment: Wintest.rex
Description: Binary data


Hälsningar/Regards/Grüsse,
P.O. Jonsson




_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to