Page MenuHomePhabricator

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

Authored by epriestley on Mar 22 2021, 6:43 PM.
Tags
None
Referenced Files
F15451742: D21643.id51509.diff
Fri, Mar 28, 11:37 PM
F15445828: D21643.diff
Thu, Mar 27, 4:11 PM
F15444743: D21643.diff
Thu, Mar 27, 11:02 AM
F15424368: D21643.id51509.diff
Sat, Mar 22, 9:49 PM
F15422623: D21643.diff
Sat, Mar 22, 9:51 AM
F15414327: D21643.diff
Thu, Mar 20, 12:10 AM
F15409977: D21643.id.diff
Wed, Mar 19, 6:21 AM
F15384773: D21643.id51510.diff
Fri, Mar 14, 8:46 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