Home GnuPG

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

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

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
epriestley <git@epriestley.com>Authored on Oct 4 2015, 5:12 PM
Parents
rPHUTIL21ee3ad4ba5f: Fix unit test errors in libphutil
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUTIL8870e8fe9df8: Allow Filesystem::walkToRoot() to operate on fictional paths (authored by epriestley <git@epriestley.com>).Oct 4 2015, 5:12 PM