Skip to content
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

lrztar fails on directory names with spaces #6

Closed
dvukolov opened this issue Dec 2, 2011 · 1 comment
Closed

lrztar fails on directory names with spaces #6

dvukolov opened this issue Dec 2, 2011 · 1 comment

Comments

@dvukolov
Copy link

dvukolov commented Dec 2, 2011

There seems to be an issue with how lrztar handles directory names containing spaces:

$ lrztar "a directory"
Failed to open directory.tar.lrz
No such file or directory
Fatal error - exiting

$ lrztar "one more directory"
Cannot specify output filename with more than 1 file
Fatal error - exiting

Quite peculiar :)

@gotti-zz
Copy link

Hi,

I think the problem is that lrzip will get something like

lrzip -o a directory
but should instead get a
lrzip -o "a directory"

One possibilty is to give in a filename with

$ lrztar -o directory.tar.lrz "a directory"
but be warned the given filename must not contain a SPACE.

Below is a patch that will hopefully solve this issue (warning untested). Be warned it will not solve the issue if you give in something like

lrztar -o "Sicherung directory.tar.lrz" "a directory"
This will still not work and currently I know no way to solve this quick and not to dirty.

Patch:

--- lrztar  2012-01-13 17:54:57.808903021 +0100
+++ lrztar.old  2012-01-13 17:54:32.044970815 +0100
@@ -64,7 +64,7 @@
         lrzcat $p "$i" | tar x
         x=$?
     } || {
-        ((v_o)) || p="$p -o \"$(basename "$s").tar.${vopt[v_S]}\""
+        ((v_o)) || p="$p -o $(basename "$s").tar.${vopt[v_S]}"
         [[ -d $s ]] || {
             printf "lrztar: directory does not exist: %s\n" "$s"
             return 1

I hope this will help you.

Gotti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants