Page MenuHomePhabricator

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

Authored by epriestley on Mar 22 2021, 6:43 PM.
Tags
None
Referenced Files
F18744789: D21643.id51509.diff
Fri, Oct 3, 4:09 AM
F18681066: D21643.diff
Fri, Sep 26, 3:46 AM
F18678953: D21643.diff
Thu, Sep 25, 11:56 PM
F18656293: D21643.diff
Mon, Sep 22, 10:03 PM
F18642636: D21643.diff
Fri, Sep 19, 12:24 AM
F18642620: D21643.diff
Fri, Sep 19, 12:21 AM
F18625158: D21643.id.diff
Sep 15 2025, 10:06 PM
F18595265: D21643.diff
Sep 12 2025, 9:04 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