Page MenuHomePhabricator

On Windows, implement "Filesystem::copyFile()" with "copy()"
ClosedPublic

Authored by epriestley on Mar 22 2021, 6:43 PM.
Tags
None
Referenced Files
F15521241: D21643.diff
Sun, Apr 20, 12:31 PM
F15515511: D21643.diff
Fri, Apr 18, 11:14 AM
F15491535: D21643.id51510.diff
Sat, Apr 12, 4:42 AM
F15490506: D21643.diff
Fri, Apr 11, 6:00 PM
F15490422: D21643.id.diff
Fri, Apr 11, 5:16 PM
F15485970: D21643.diff
Thu, Apr 10, 4:00 AM
F15470285: D21643.diff
Fri, Apr 4, 9:30 PM
F15451742: D21643.id51509.diff
Fri, Mar 28, 11:37 PM
Subscribers
None

Details

Summary

Ref T13562. Currently, "Filesystem::copyFile()" uses "copy", which doesn't work now that we no longer invoke "cmd.exe" by default.

Use "copy()" instead.

Note that this whole function is probably nonsense, but I'll follow up on T13562.

Test Plan
  • Created a standalone script which runs "Filesystem::copyFile()".
    • Before: failed to copy any file.
    • After: succesfully copied normal files.
    • After: failed to copy a file over an existing directory with a reasonable error.
    • After: failed to copy a file over itself with a reasonable error.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable