Boost logo

Boost Users :

From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2006-11-06 07:36:36


> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Küppers, Ben
> Sent: Monday, November 06, 2006 2:59 AM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [filesystem] unable to parse file path
>
> Ongoing development now warrants that we interact with the Windows
> apps from Linux and vice versa. In the midst of all this it becomes
> inevitable to run into the occasional Windows file path on Linux (or Linux
> path on Windows)(usually through file IO). I use portable paths wherever I
> can but I don't have control over all the input.

[Nat] I see. But it should work to convert to forward-slashes everywhere.

Sorry for being terse earlier. When I said a character-substitution pass is "cheaper" than reimplementing any significant part of boost::filesystem, I was really thinking of coding/maintenance time.
 
> I am disappointed that the library eliminates the code to treat
> backslashes as directory separators at compile-time on non-Windows systems
> and doesn't provide me with an option to explicitly enable this code for
> the few file paths that I know will have a Windows syntax.

[Nat] That could be a useful enhancement. If you're interested enough, you might submit a code and documentation patch.

Until then, maybe you could introduce a path subclass for your own use that replaces all '\' with '/' before passing the input path string to the base class.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net