Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2004-01-13 05:09:29

Bugs item #875970, was opened at 2004-01-13 02:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Boost::Filesystem fails when last character in path is ':'

Initial Comment:
Boost::filesystem library fails when the last character in
a directory name is ':'

Example path '/my/test/path/is/c:'

This isn´t valid on windows, but on ReiserFS this is a
valid directory path.

The bug is located in path::m_path_append(...)
(path_posix_windows.cpp) where the follwing code try
to append '/' if neccesary


// append '/' if needed
if ( !empty()
      && *(m_path.end()-1) != ':'
      && *(m_path.end()-1) != '/' )
              m_path += '/';


If I want to append myFile.txt to the path with the
existing code the result will be:
'/my/test/path/is/c:myFile.txt' => ERROR

My suggestion is to replace this section with


// append '/' if needed
if ( !empty()
      && *(m_path.end()-1) != ':'
      && *(m_path.end()-1) != '/' )
              m_path += '/';


e-mail: tommy.edvardsen_at_[hidden]


You can respond by visiting:

This email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval!
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at