Permalink
Browse files

fix incorrect error reporting on including control file, added -1 d o…

…ption
  • Loading branch information...
1 parent bab0b81 commit a94a0acf7efda0ffafb5d6058a2402dba5b03bd1 @kholtman committed Sep 23, 2012
Showing with 18 additions and 5 deletions.
  1. +9 −0 HISTORY
  2. +6 −0 afio.1
  3. +3 −5 afio.c
View
@@ -979,3 +979,12 @@ Closes Debian bug #310806.
Changed makefile to use $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) out of
environment variables, these are set in some compile environments.
Based on report and patch by Jari Aalto.
+
+Version 2.5.1-3:
+
+Fixed bug (introduced in 2.5) of afio giving an error message (and
+nonzero exit) when including a control file in an archive. Bug
+reported by Ian Campbell. Closes Debian bug #686613.
+
+Added d letter for the -1 option.
+
View
@@ -878,6 +878,12 @@ will suppress the printing of all warning messages asssociated with
.IR M ultivolume
archive handling, messages like "Output limit reached" and
"Continuing".
+.B d
+is for ignoring in the exit code any warnings about changed
+files, which will be printed when, on creating an archive, a file that
+is being archived changes while it is being written into the archive,
+where the changing is detected by examining the file modification time
+stamp.
.B r
is for ignoring certain warnings during the verify (\-r) operation.
If this letter is used, some verification errors that are
View
@@ -3758,7 +3758,8 @@ out (av)
/* ASX check if file changed between the begining
and end of the backup */
- if (*fsname)
+ /* if *fsname==0, it was a control file, so do not check then */
+ if (*fsname!=0)
{
struct stat st;
/* I must check fsname !
@@ -3773,13 +3774,10 @@ out (av)
if (st.st_mtime!=sb.sb_mtime)
{
warn (fsname, "File was modified during its backup");
+ if(index(ignorewarnings,(int)'d')) warnings--;
}
}
}
- else
- {
- warn (name, "ASX no fsname for this name ??");
- }
if(aflag && *fsname && ((sb.sb_mode & S_IFMT)==S_IFREG))
{

0 comments on commit a94a0ac

Please sign in to comment.