Page MenuHomePhabricator

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

Authored by epriestley on Mar 22 2021, 6:43 PM.
Tags
None
Referenced Files
F13048661: D21643.diff
Thu, Apr 18, 10:03 PM
Unknown Object (File)
Sun, Apr 7, 11:12 AM
Unknown Object (File)
Fri, Apr 5, 10:02 AM
Unknown Object (File)
Feb 14 2024, 12:18 AM
Unknown Object (File)
Feb 7 2024, 9:47 AM
Unknown Object (File)
Jan 20 2024, 10:52 AM
Unknown Object (File)
Jan 16 2024, 2:28 PM
Unknown Object (File)
Jan 16 2024, 4:54 AM
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