Page MenuHomePhabricator

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

Authored by epriestley on Aug 15 2018, 5:43 PM.
Referenced Files
F13222761: D19591.diff
Sun, May 19, 3:56 AM
F13205413: D19591.diff
Wed, May 15, 1:55 AM
F13189058: D19591.diff
Sat, May 11, 5:42 AM
Unknown Object (File)
Tue, May 7, 9:25 AM
Unknown Object (File)
Fri, May 3, 9:13 AM
Unknown Object (File)
Thu, May 2, 4:53 AM
Unknown Object (File)
Mon, Apr 29, 6:09 PM
Unknown Object (File)
Thu, Apr 25, 2:50 AM



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

rPHU libphutil
Lint Not Applicable
Tests Not Applicable