Re: [Boost-users] [filesystem] unable to parse file path
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Küppers, Ben Sent: Monday, November 06, 2006 2:59 AM To: boost-users@lists.boost.org 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.
participants (1)
-
Nat Goodspeed