Modify

Opened 13 years ago

Closed 10 years ago

#366 closed Feature Requests (fixed)

handle double '/' in the boost::filesystem

Reported by: rsrus Owned by: Beman Dawes
Milestone: Component: filesystem
Version: None Severity: Showstopper
Keywords: Cc: bdawes@…

Description (last modified by Dave Abrahams)

Hi.

Sometimes I make some path by hand. For example

  std::string str = "./";
  //... some code ....
  std::string str2 = str + "/path/to/file";

The result is ".//path/to/file". If I try to make path
from it:

   boost::filesystem::path fs_path2(str2, fs::native);

I got exception. Is it possible to correct function

   path::m_path_append

to handle this situation (double/triple/... separator
in the middle of string)?

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Dave Abrahams

Cc: bdawes@… added
Component: Nonefilesystem
Description: modified (diff)
Severity: Showstopper

Can't assign this to Beman until he logs into Trac once.

comment:2 Changed 10 years ago by Dave Abrahams

Owner: changed from nobody to Beman Dawes
Status: assignednew

comment:3 Changed 10 years ago by Beman Dawes

Resolution: Nonefixed
Status: newclosed

This is an old issue that evaporated when Boost.Filesystem eliminated the checking on construction, so I closing the ticket.

Note, incidentally, that multiple backslashes are valid in POSIX and other operating systems.

--Beman

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Beman Dawes.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.