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, Jan 22, 11:24 AM
Unknown Object (File)
Sun, Jan 19, 5:53 PM
Unknown Object (File)
Fri, Jan 17, 9:54 PM
Unknown Object (File)
Fri, Dec 27, 6:00 PM
Unknown Object (File)
Fri, Dec 27, 5:03 PM
Unknown Object (File)
Dec 21 2024, 5:28 PM
Unknown Object (File)
Dec 16 2024, 1:37 PM
Unknown Object (File)
Dec 14 2024, 4:54 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
Branch
win1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25317
Build 34951: Run Core Tests
Build 34950: arc lint + arc unit