[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] debian bugs #377330 #379393
From: |
Sergey Poznyakoff |
Subject: |
Re: [Bug-tar] debian bugs #377330 #379393 |
Date: |
Fri, 08 Sep 2006 19:45:47 +0300 |
Vladimir Suplin <address@hidden> wrote:
> It seems that there are bugs in 1.15.91 version in incremen.c:
> function try_purge_directory
Yes, there is. I have installed the following patch. Thanks for
reporting.
Regards,
Sergey
Index: src/incremen.c
===================================================================
RCS file: /cvsroot/tar/tar/src/incremen.c,v
retrieving revision 1.50
diff -p -u -r1.50 incremen.c
--- src/incremen.c 7 Aug 2006 21:29:27 -0000 1.50
+++ src/incremen.c 8 Sep 2006 16:42:45 -0000
@@ -1381,22 +1381,23 @@ try_purge_directory (char const *directo
free (p);
p = new_name (directory_name, cur);
- if (!(entry = dumpdir_locate (current_stat_info.dumpdir, cur))
- || (*entry == 'D' && S_ISDIR (st.st_mode))
- || (*entry == 'Y' && !S_ISDIR (st.st_mode)))
+ if (deref_stat (false, p, &st))
{
- if (deref_stat (false, p, &st))
+ if (errno != ENOENT) /* FIXME: Maybe keep a list of renamed
+ dirs and check it here? */
{
- if (errno != ENOENT) /* FIXME: Maybe keep a list of renamed
- dirs and check it here? */
- {
- stat_diag (p);
- WARN ((0, 0, _("%s: Not purging directory: unable to stat"),
- quotearg_colon (p)));
- }
- continue;
+ stat_diag (p);
+ WARN ((0, 0, _("%s: Not purging directory: unable to stat"),
+ quotearg_colon (p)));
}
- else if (one_file_system_option && st.st_dev != root_device)
+ continue;
+ }
+
+ if (!(entry = dumpdir_locate (current_stat_info.dumpdir, cur))
+ || (*entry == 'D' && !S_ISDIR (st.st_mode))
+ || (*entry == 'Y' && S_ISDIR (st.st_mode)))
+ {
+ if (one_file_system_option && st.st_dev != root_device)
{
WARN ((0, 0,
_("%s: directory is on a different device: not purging"),