浏览代码

(finish_sparse_file): Use excluded_filename instead of check_exclude.
Don't bother to stat excluded file names.

Paul Eggert 26 年之前
父节点
当前提交
0a42307c1d
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/create.c

+ 3 - 4
src/create.c

@@ -1478,9 +1478,10 @@ Read error at byte %s, reading %lu bytes, in file %s"),
 
       while (entry = readdir (directory), entry)
 	{
-	  /* Skip `.' and `..'.  */
+	  /* Skip `.', `..', and excluded file names.  */
 
-	  if (is_dot_or_dotdot (entry->d_name))
+	  if (is_dot_or_dotdot (entry->d_name)
+	      || excluded_filename (excluded, entry->d_name))
 	    continue;
 
 	  if ((int) NAMLEN (entry) + len >= buflen)
@@ -1495,8 +1496,6 @@ Read error at byte %s, reading %lu bytes, in file %s"),
 #endif
 	    }
 	  strcpy (namebuf + len, entry->d_name);
-	  if (exclude_option && check_exclude (namebuf))
-	    continue;
 	  dump_file (namebuf, our_device, 0);
 	}