www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15865] New: std.file.copy(from,to) deletes the file if from

https://issues.dlang.org/show_bug.cgi?id=15865

          Issue ID: 15865
           Summary: std.file.copy(from,to) deletes the file if from and to
                    specify the same file
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

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.

--
Apr 02 2016