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
Unknown Object (File)
Tue, Dec 17, 1:19 PM
Unknown Object (File)
Tue, Dec 17, 5:28 AM
Unknown Object (File)
Sun, Dec 1, 4:04 AM
Unknown Object (File)
Wed, Nov 20, 1:19 AM
Unknown Object (File)
Nov 15 2024, 8:40 PM
Unknown Object (File)
Nov 12 2024, 1:47 PM
Unknown Object (File)
Nov 7 2024, 7:44 PM
Unknown Object (File)
Nov 6 2024, 8:23 PM
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