forked from ccache/ccache
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Util::make_relative_path able to find matches for canonical path (…
…ccache#760) Scenario: - /tmp is a symlink to /private/tmp. - Both apparent and actual CWD is /private/tmp/dir. - A path (e.g. the object file) on the command line is /tmp/dir/file.o. - Base directory is set up to match /tmp/dir/file.o. Ccache then rewrites /tmp/dir/file.o into ../../private/tmp/dir/file.o, which is correct but not optimal since ./file.o would be a better relative path. Especially on macOS where, for unknown reasons, the kernel sometimes disallows opening a file like ../../private/tmp/dir/file.o for writing. Improve this by letting Util::make_relative_path try to match real_path(path) against the CWDs and choose the best match. Closes ccache#724.
- Loading branch information
Showing
2 changed files
with
49 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters