-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teach toTar to omit extraneous leading directory paths
Imagine a directory structure like so: /tmp └── reports ├── result-1.xml └── subdir └── result-2.xml Prior to this change, when toTar was given a path like "/tmp/reports", the resulting tar would have the following structure: /tmp └── reports ├── result-1.xml └── subdir └── result-2.xml With the changes in this commit, the resulting tar has the following structure: . ├── result-1.xml └── subdir └── result-2.xml In other words, the resulting tar file omits the extraneous /tmp and /tmp/reports directories. This also resolves an issue that would lead to invalid tar files when using certain relative path structures (e.g., "../../reports").
- Loading branch information
1 parent
4bbefa1
commit b0f1731
Showing
2 changed files
with
15 additions
and
11 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