Bug 15865 – std.file.copy(from,to) deletes the file if from and to specify the same file
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-04-03T04:23:00Z
Last change time
2016-04-04T16:51:21Z
Keywords
pull
Assigned to
nobody
Creator
bugzilla
Comments
Comment #0 by bugzilla — 2016-04-03T04:23:02Z
It does this because on non-Windows systems, the implementation creates the 'to' file before reading the 'from' file.
Severity bumped to 'major' because deleting files is not nice.
Comment #1 by dlang-bugzilla — 2016-04-04T14:18:45Z