Opened 13 years ago

Closed 12 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@… 13 years ago.
patch

Download all attachments as: .zip

Change History (2)

by dgoncharov@…, 13 years ago

patch

comment:1 by Beman Dawes, 12 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.