Created on 2016-04-19.00:00:00 last changed 89 months ago
Proposed resolution:
Modify paragraph 3 of [fs.op.copy] as shown:
Effects: Before the first use of
f
andt
:
— If(options & copy_options::create_symlinks) != copy_options::none || (options & copy_options::skip_symlinks) != copy_options::none
thenauto f = symlink_status(from)
and if neededauto t = symlink_status(to)
.
— Otherwise, if(options & copy_options::copy_symlinks) != copy_options::none
thenauto f = symlink_status(from)
and if neededauto t = status(to)
.
— Otherwise,auto f = status(from)
and if neededauto t = status(to)
.
[ 2016-08 Chicago ]
Wed AM: Move to Tentatively Ready
[ 2016-05 Issues Telecon ]
This is related to 2682; and should be considered together.
[fs.op.copy] paragraph 3 bullet (3.4) says that if is_symlink(f)
and
copy_options
is set in options then it should copy a symlink, but that
case cannot be reached.
is_symlink(f)
can only be true if f was set using
symlink_status(from)
, but that doesn't happen unless one of
create_symlinks
or skip_symlinks
is set in options. It should depend
on copy_symlinks
too.
I'm not sure what the correct behaviour is, but I don't think we
want to simply add a check for copy_symlinks
in bullet (3.1) because
that would mean that t = symlink_status(to)
, and I don't think we want
that. Consider 'touch file; mkdir dir; ln -s dir link;'
and then
filesystem::copy("file", "link",
filesystem::copy_options::copy_symlinks)
. If t = symlink_status(to)
then is_directory(t) == false
, and we don't use bullet (3.5.4) but go
to (3.5.5) instead and fail. So when copy_symlinks
is set we still
need to use t = status(to)
as specified today.
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-04 02:52:49 | admin | set | messages: + msg8382 |
2016-08-04 02:52:49 | admin | set | status: new -> ready |
2016-05-22 15:38:38 | admin | set | messages: + msg8133 |
2016-05-10 21:02:20 | admin | set | messages: + msg8117 |
2016-04-19 00:00:00 | admin | create |