-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with nested dirs in u7z mkdir action #4559
Comments
Branch: 4559_extfs_u7z_mkdir |
Andrew, I need to clarify something in the comment text. The "by default, 7z only looks at the last part of the path" is only true for ABSOLUTE pathes. u7z operates on absolute pathes and my patch works, but the commit text should be changed:
this
should be replaced with
|
Also, in the post text above my description of the -spf option is wrong. The option is only related to ABSOLUTE pathes again:
Relative pathes are added as a whole, no matter if there is -spf or not. |
Fixed commit message. Pushed forced. |
I didn't test, but code and description look sound. |
|
Important
This issue was migrated from Trac:
ponko
(ponkotsume@….com)Current
Should be
Case1
Case2
I could guess what one meant putting -w there, and it was completely wrong idea. -w option:
Sets the working directory for the temporary base archive. By default, 7-Zip builds a new base archive file in the same directory as the old base archive file. By specifying this switch, you can set the working directory where the temporary base archive file will be built. After the temporary base archive file is built, it is copied over the original archive; then, the temporary file is deleted.
By default, 7z only looks at the last part of the path. E.g. if we say "7z a 1.7z a/b/c", it adds the "c" dir. There is the "-spf" option (idk since which version) to make it use the whole path provided, but it means more code in our case:
cd "$dir"
$P7ZIP a -spf "$1" "$2" ..
cd -
The one-liner $P7ZIP a "$1" "$dir/${2%%/*}" .. looks better.
The text was updated successfully, but these errors were encountered: