This is an archive of the discontinued LLVM Phabricator instance.

[FileSystem] Fix regression in FileSystem::Resolve
ClosedPublic

Authored by JDevlieghere on May 21 2019, 2:21 PM.

Details

Summary

When I moved the resolve code from FileSpec to the FileSystem class, I introduced a regression. If you compare the two implementations, you'll notice that if the path doesn't exist, we should only reverse the effects of makeAbsolute, not the effects of tilde expansion. As a result, the logic to create the ~/.lldb directory broke, because we would resolve the path before creating it. Because the directory didn't exist yet, we'd call create_directories on the unresolved path, which failed.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

JDevlieghere created this revision.May 21 2019, 2:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2019, 2:21 PM
davide accepted this revision.May 21 2019, 2:38 PM

LGTM, also discussed in person.

This revision is now accepted and ready to land.May 21 2019, 2:38 PM
This revision was automatically updated to reflect the committed changes.