Page MenuHomePhabricator

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

Authored by epriestley on Mar 22 2021, 6:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 6, 1:28 PM
Unknown Object (File)
Thu, Oct 24, 7:20 AM
Unknown Object (File)
Thu, Oct 24, 6:10 AM
Unknown Object (File)
Thu, Oct 24, 5:18 AM
Unknown Object (File)
Thu, Oct 24, 5:00 AM
Unknown Object (File)
Oct 22 2024, 1:41 PM
Unknown Object (File)
Oct 9 2024, 2:04 PM
Unknown Object (File)
Sep 22 2024, 8:59 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