Modify

Opened 8 years ago

Closed 7 years ago

#3863 closed Bugs (fixed)

A filesystem::path object cannot be extracted from a stream if the path contain a space

Reported by: dgoncharov@… Owned by: Beman Dawes
Milestone: Boost 1.42.0 Component: filesystem
Version: Boost 1.42.0 Severity: Problem
Keywords: Cc:

Description

e.g.

filesystem::path p;
cin >> p;

If the user enters "asdf asdf" the operator>>() will extract chars until the first space and the path'll be "asdf".

Replacing

is >> str;

in the implementation of operator>>() with

std::getline(is, str);

fixes the problem.

Attachments (1)

fs_path_extract_operator.patch (416 bytes) - added by dgoncharov@… 8 years ago.
patch

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by dgoncharov@…

patch

comment:1 Changed 7 years ago by Beman Dawes

Resolution: fixed
Status: newclosed

(In [62919]) Fix #3863, stream I/O with space in named failed to roundtrip

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.