Can add a directory/file multiple times to the Backup pane
gperciva opened this issue · comments
Backup->file browser
I can select the same directory multiple times, then when I create an archive, it contains multiple copies of those files. However, I just verified that this behaviour is true of the command-line program as well, so I'm not certain this is a "bug". In the interests of user-friendliness, I'd be tempted to try avoiding this, but it might be tricky and certainly isn't a high priority.
For reference, here's an example (command-line only, for easy copy&paste)
td@gin: ~/src/tarsnap/build (master)
$ ./tarsnap -c -f weird_double --print-stats ~/backup ~/backup
tarsnap: Removing leading '/' from member names
Total size Compressed size
All archives 12 MB 3.6 MB
(unique data) 2.5 MB 925 kB
This archive 5.4 MB 1.8 MB
New data 11 kB 3.7 kB
td@gin: ~/src/tarsnap/build (master)
$ ./tarsnap -t -f weird_double
home/td/backup/
home/td/backup/lorem-5000.txt
home/td/backup/lorem-1000.txt
home/td/backup/zeros-900k-b.txt
home/td/backup/random-900k.txt
home/td/backup/zeros-900k-a.txt
home/td/backup/
home/td/backup/lorem-5000.txt
home/td/backup/lorem-1000.txt
home/td/backup/zeros-900k-b.txt
home/td/backup/random-900k.txt
home/td/backup/zeros-900k-a.txt
td@gin: ~/src/tarsnap/build (master)
$
I could restrict this if there's no reason in the world why anyone would want to do this. I can't think of any personally.
I could imagine somebody (like my mother) including (sub)directories without realizing they were recursing? i.e.
/home/me/documents/
/home/me/documents/essays/
/home/me/documents/dissertation/
/home/me/documents/dissertation/raw-data/
This isn't aimed at the "able to use the command-line" crowd, but rather if Tarsnap does expand into regular OSX users (and potentially even Windows users), it could happen. Let's just leave this issue in the tracker for now, and re-visit it in a few weeks. I'll try to think of some newbie-friendly text (or images) that could help.
I can warn one time per session with something like:
"Adding the same files and directories to the backup list multiple times won't make your data safer. :-)"
Either that or restrict to unique urls.