|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2003-07-23 04:42:43
Bugs item #776146, was opened at 2003-07-23 02:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=776146&group_id=7586
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: boost::filesystem fails in posix with files containing ':'
Initial Comment:
(Too bad one can't mail to the mailing lists without
registering first. My email is flux-boost_at_inside.org.)
I have Boost 1.30.0-4 from Debian GNU/Linux.
The exception I'm getting for merely handling such a path:
boost::filesystem::path: invalid name "foo:_Kuu" in
path: "foo:_Kuu"
The problem seems to stem from
libs/filesystem/path_posix_windows.cpp, where a
function called generic_name checks against a ton of
letters that pose a problem in Windows - however, the
only characters not legal in a Unix-filename are / and
\0.
Is it really a job of this class to check for
path-validity anyway? Well I suppose that has been
discussed already ;).
The function checks also for spaces at the beginning
and at the end of a segment, surely one would imagine
they are legal in Windows too?-o
I didn't fully investigate the matter, but ///tmp///foo
is also a legal unix-path, albeit redundant, I hope
that doesn't pose a problem?
My hackish fix:
bool generic_name( const std::string & name )
{
#ifdef BOOST_WINDOWS
return name.size() != 0
&& name.find_first_of( invalid_generic ) ==
std::string::npos
&& name != "."
&& name != ".."
&& *name.begin() != ' '
&& *(name.end()-1) != ' ';
#else
return name.size() != 0
&& name != "."
&& name != "..";
#endif
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=776146&group_id=7586
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk