Page MenuHomePhabricator

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

Authored by epriestley on Mar 22 2021, 6:43 PM.
Tags
None
Referenced Files
F19515896: D21643.id.diff
Wed, Jan 14, 5:18 PM
F19512852: D21643.diff
Tue, Jan 13, 3:45 AM
F19086835: D21643.diff
Dec 2 2025, 10:53 PM
F19086828: D21643.diff
Dec 2 2025, 10:47 PM
F19032198: D21643.diff
Nov 25 2025, 5:00 AM
F18917065: D21643.diff
Nov 9 2025, 9:23 AM
F18803374: D21643.id51510.diff
Oct 17 2025, 11:12 PM
F18744789: D21643.id51509.diff
Oct 3 2025, 4:09 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
Branch
win1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25317
Build 34951: Run Core Tests
Build 34950: arc lint + arc unit