>> Attached diff also checks st_dev, which ought to cover all cases.
> Good catch, I will apply this tonight.
The patch has been applied.
> This might lead to false positive if the tar file is written to another
> device.
>
> $ ~/.sbase/bin/tar cf /mnt/backup/test.tar .config
> ignoring '.config/zathura/zathurarc'
>
> $ find .config/zathura/zathurarc /mnt/backup/test.tar -printf "%i %D %p\n"
> 1259 2050 .config/zathura/zathurarc
> 1
This might lead to false positive if the tar file is written to another device.
$ ~/.sbase/bin/tar cf /mnt/backup/test.tar .config
ignoring '.config/zathura/zathurarc'
$ find .config/zathura/zathurarc /mnt/backup/test.tar -printf "%i %D %p\n"
1259 2050 .config/zathura/zathurarc
1259 2081 /mnt/bac
> This patch fixes this issue using the inode number of the tar
> file.
I like this fix; it has been applied. Thank you for sending this as
an attachment.
This patch fixes this issue using the inode number of the tar
file.
--
Roberto E. Vargas Caballero
k...@shike2.com
http://www.shike2.com
>From e5b989e7899c87f316597e6b8ed39adfa97959b2 Mon Sep 17 00:00:00 2001
From: "Roberto E. Vargas Caballero"
Date: Sat, 20 Jul 20
Hi,
When tar has to archiving the same directory where the
output file is located, (for example with something like
tar cf f.tar .) it enters in a infinite loop in:
@archive
while((l = fread(b, 1, Blksiz, f)) > 0) {
if(l < Blksiz)
memset(b+l