HomePhabricator

Allow Filesystem::walkToRoot() to operate on fictional paths

Description

Allow Filesystem::walkToRoot() to operate on fictional paths

Summary:
This is part of fixing a unit test in arc, but generally seems like a reasonable/desirable behavior.

If you have a path like /x/y/z, where the path is fictional and none of the components actually exist:

  • Prior to D13202, we'd walk "/x/y/z" -> "/x/y/" -> "/x" -> "/".
  • After D13202, the isDescendant() check rejects this and we don't walk anywhere. We also never hit "/".
  • After this diff, walk it again.

The old behavior seems reasonable to me.

Test Plan: Added a unit test, ran unit tests. See next revision (test in arc) for additional context.

Reviewers: joshuaspence, chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14231

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Oct 4 2015, 3:12 PM
Reviewer
chad
Differential Revision
D14231: Allow Filesystem::walkToRoot() to operate on fictional paths
Parents
rPHU21ee3ad4ba5f: Fix unit test errors in libphutil
Branches
Unknown
Tags
Unknown
Build Status
Buildable 8177
Build 9343: Run Core Tests