Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50555 - trunk/libs/filesystem/src
From: bdawes_at_[hidden]
Date: 2009-01-12 11:57:53


Author: bemandawes
Date: 2009-01-12 11:57:52 EST (Mon, 12 Jan 2009)
New Revision: 50555
URL: http://svn.boost.org/trac/boost/changeset/50555

Log:
Filesystem: fix native(name) test failures on POSIX
Text files modified:
   trunk/libs/filesystem/src/portability.cpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/libs/filesystem/src/portability.cpp
==============================================================================
--- trunk/libs/filesystem/src/portability.cpp (original)
+++ trunk/libs/filesystem/src/portability.cpp 2009-01-12 11:57:52 EST (Mon, 12 Jan 2009)
@@ -56,7 +56,9 @@
 # else
     BOOST_FILESYSTEM_DECL bool native( const std::string & name )
     {
- return name.find('/') == std::string::npos;
+ return name.size() != 0
+ && name[0] != ' '
+ && name.find('/') == std::string::npos;
     }
 # endif
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk