diff options
| author | Mantas Mikulėnas <grawity@gmail.com> | 2018-06-26 14:58:08 +0300 |
|---|---|---|
| committer | Mantas Mikulėnas <grawity@gmail.com> | 2018-06-26 14:58:08 +0300 |
| commit | 82c95c133d06acb19c1e82a0f76c541920f91409 (patch) | |
| tree | 70193219fe5fdb2394d017312992c55aace5be3c | |
| parent | cdbebb797029778f6aa6dfa495d99f5fd5251034 (diff) | |
collapse '/' initial path item when fake-root is givenarch
Before, "/foo/bar/baz" would result in:
["fakeroot", "/", "foo", "bar", baz"]
fakeroot///foo/bar/baz
After:
["fakeroot", "foo", "bar", baz"]
fakeroot/foo/bar/baz
| -rwxr-xr-x | treeify | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -216,6 +216,9 @@ if ($opt{path}) { } if ($opt{fakeroot}) { + while ($tree->{"/"}) { + $tree = $tree->{"/"} + } $tree = {$opt{fakeroot} => $tree}; } |
