Platform-specific file path delimiters

Roger Eller roger.e.eller at sealedair.com
Wed Sep 23 14:42:29 EDT 2015


On Sep 23, 2015 1:32 PM, "Mark Waddingham" <mark at livecode.com> wrote:
>
> On 2015-09-23 18:53, Richard Gaskin wrote:
>>
>> A regression with UNC paths was recently fixed:
>> <http://quality.runrev.com/show_bug.cgi?id=15814>
>>
>> Most interesting to me there is that it allows the use of the
>> Windows-specific "\" as a file path delimiter.
>
>
> This is very much a case of 'unintended consequences' or 'just because
you can do something, it doesn't mean you should' (and why maintaining,
updating, evolving the engine whilst retaining backwards compatibility can
be very very difficult at times).

Since I didn't have the good fortune of being personally tutored by the
creator of MetaCard, and am primarily a Windows user, when I pasted a UNC
path and "it just worked", I was like WOW, those runrev guys have really
made this Revolution thing super easy for the novice.  Go team!

>
>
>> I didn't know OS-specific delimiters could be used.
>
>
> That's good - you shouldn't use them - it would probably be best that
everyone forgets that you can, and try to ensure you don't use them
anywhere in new applications :)
>

Please announce this on first run if the OS isn't *nix based, or warn in
the script editor.

One fact regarding this anomaly is that after 6.5.2 it no longer worked
with the preferred // either.

>
> However, as I said above, don't use OS specific separators in your paths
in new apps / code. Always use '/' and let the engine do the right thing -
you'll be better off that way :)
>
> Mark.
>
> --
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>

~Roger



More information about the use-livecode mailing list