> > On OpenBD the file path is using the wrong separator: a fwd slash
> > instead of a backslash (I'm on Windows here... obviously / would be
> > fine on *nix).  This means if one pastes the "path" into a file-open
> > dialogue, the Windows Explorer Shell just goes "huh?  Wazzat?".
>
> Have you tried it?  I have it on good authority that fwd slashes do work
> because we used then all the time when we used to we Windows:

Well... um... see the para above the one you're replying to.  Yes.

My tests were limited to Windows Vista Home Premium, though.

> http://bytes.com/topic/python/answers/23123-when-did-windows-start-ac...
>
> The only place where Windows balks at fwd slash in at the command line
> not enclosed in a quote because "/" is a switch delimiter.

Well it doesn't work on:
notepad
textpad
Eclipse / CFB (and, indeed, this is the only one I care about, but I
occasionally use notepad/textpad)
wordpad
Acrobat Reader
Firefox
[etc... I'm getting bored now...]

It DOES work in MS Word & IE8, interestingly enough.  So it can't be
just the Windows Explorer shell itself.  Still: it doesn't work more
often than it does.

Just a note: it will be a very rare occasion that I say something
happens, but I haven't actually checked first ;-)


> And if you
> want the well-know Corfield rant:
>
> http://corfield.org/blog/post.cfm/Backslash_is_NOT_a_path_separator

Well yes.  Good old Sean.  Whilst he's right about CF code, he's only
looking at a superficial part of the issue (which is fine, he was only
referring to one instance of slash usage).  It's interesting that he
cites the magic of Java in his rationale as to why just using a fwd
slash will always do.  It seems that Java itself has an opinion on
this in that it exposes the local file system's separator via
java.io.File.SEPARATOR.  And it doesn't return "oh, just use whichever
one you want": on Windows, it returns a back slash.

I'm all good for just using a fwd slash in my code, he's spot on
there.  But that's not the only consideration.  I have seen a few UIs
in which file paths are output, and they're a mishmash of slashes in
different directions (and doubling up is another good one) because the
developer has lazily thought "slashes... pah... fwd slash will
*work*", and appends something to a value returned from
getDirectoryFromPath(), or a <cfidrectory> return value or what-have-
you (both of which use the correct slashes.

Equally, in the example I cited... fwd slashes DO NOT WORK across the
board.

--
Adam

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 official manual: http://www.openbluedragon.org/manual/
 Ready2Run CFML http://www.openbluedragon.org/openbdjam/

 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to