Page MenuHomePhabricator

Fix Filesytem::walkToRoot() on Windows with default ("/") root
ClosedPublic

Authored by epriestley on Aug 15 2018, 5:43 PM.
Tags
None
Referenced Files
F13529383: D19591.diff
Fri, Jul 26, 10:04 PM
Unknown Object (File)
Sun, Jul 21, 5:25 PM
Unknown Object (File)
Sun, Jul 21, 4:46 AM
Unknown Object (File)
Thu, Jul 4, 12:09 PM
Unknown Object (File)
Sat, Jun 29, 1:40 AM
Unknown Object (File)
Jun 23 2024, 6:25 AM
Unknown Object (File)
Jun 13 2024, 11:11 AM
Unknown Object (File)
Jun 8 2024, 7:50 AM
Subscribers
None

Details

Summary

Fixes T9459. See PHI817. An install is reporting that arc upgrade fails on Windows, failing to recognize that arcanist/ is a Git working copy.

This appears to reproduce for me, and boil down to FileList->contains() testing if / contains C:\Application Data32\Roaming\My Documents\Users\epriestley\devtools\arcanist. It (literally) does not, but our intent is that it should.

Instead of defaulting the root to /, treat it somewhat more specially so Filesystem::walkToRoot(X) on Windows always walks all the way up.

Test Plan

This is slightly shaky since my Windows "development environment" is a mess, but I was able to run arc upgrade with this patch applied and make it through working copy recognition. I'll re-test after landing.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable