]> Dogcows Code - chaz/tar/commitdiff
Normalized use of remove_any_file().
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 12 Sep 2004 12:50:31 +0000 (12:50 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 12 Sep 2004 12:50:31 +0000 (12:50 +0000)
src/extract.c
src/misc.c

index 214d975e5b3e84b79266a13287e6384321d4dd73..f348b822ed6620c2dcdd3854cdd460e9dc1166eb 100644 (file)
@@ -462,7 +462,9 @@ prepare_to_extract (char const *file_name)
   switch (old_files_option)
     {
     case UNLINK_FIRST_OLD_FILES:
-      if (!remove_any_file (file_name, recursive_unlink_option)
+      if (!remove_any_file (file_name, 
+                            recursive_unlink_option ? RECURSIVE_REMOVE_OPTION 
+                                                      : ORDINARY_REMOVE_OPTION)
          && errno && errno != ENOENT)
        {
          unlink_error (file_name);
@@ -519,7 +521,7 @@ maybe_recoverable (char *file_name, int *interdir_made)
        case NO_OVERWRITE_DIR_OLD_FILES:
        case OVERWRITE_OLD_FILES:
          {
-           int r = remove_any_file (file_name, 0);
+           int r = remove_any_file (file_name, ORDINARY_REMOVE_OPTION);
            errno = EEXIST;
            return r;
          }
index 51561e4dc9c770dc4eb6e5450555ba5b709c75fc..bead6800c9113a2062bd3233f053b1b3c0d777b1 100644 (file)
@@ -317,7 +317,8 @@ remove_any_file (const char *file_name, enum remove_option option)
                 entry += entrylen + 1)
              {
                char *file_name_buffer = new_name (file_name, entry);
-               int r = remove_any_file (file_name_buffer, 1);
+               int r = remove_any_file (file_name_buffer, 
+                                         RECURSIVE_REMOVE_OPTION);
                int e = errno;
                free (file_name_buffer);
 
This page took 0.03156 seconds and 4 git commands to generate.