Modify

Ticket #3863 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Reported by: dgoncharov@… Owned by: bemandawes
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

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

Change History

Changed 4 years ago by dgoncharov@…

patch

comment:1 Changed 4 years ago by bemandawes

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.