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

multiline filenames are not backuped #21

Open
Al- opened this issue Apr 11, 2021 · 1 comment
Open

multiline filenames are not backuped #21

Al- opened this issue Apr 11, 2021 · 1 comment

Comments

@Al-
Copy link

Al- commented Apr 11, 2021

Filenames that contain linebreaks are not included in the backups:

$ ls mul*
'multiline'$'\n''filename'
$ ls mul* | hexdump -C
00000000  6d 75 6c 74 69 6c 69 6e  65 0a 66 69 6c 65 6e 61  |multiline.filena|
00000010  6d 65 0a                                          |me.|
00000013

Output from backup2l:

...
Creating archive using 'DRIVER_TAR_GZ'...
  tar: filename: Cannot stat: No such file or directory
  tar: /home/xxx/xxx/xxx/multiline: Cannot stat: No such file or directory
...
  < filename
  < /home/xxx/xxx/xxx/multiline

It does not seem to be a limitation of tar (albeit the error message seems to imply), as tar can process this file:

$ tar --create --file /tmp/testtar.tar.gz ./multi*
$ tar --list --file /tmp/testtar.tar.gz
./multiline\nfilename

My system:

  • Linux xxx 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • backup2l v1.6 by Gundolf Kiefer
  • stat (GNU coreutils) 8.30
  • tar (GNU tar) 1.30
@gkiefer
Copy link
Owner

gkiefer commented Jun 7, 2023

To fix this, a careful review of all quotations in the code and testing is necessary.

Patches are welcome!

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

2 participants