Prechádzať zdrojové kódy

If extracting a directory, and it doesn't already exist on disk, and is
shared with another package, don't error cause an error.

Adam Heath 25 rokov pred
rodič
commit
b485d735d4
2 zmenil súbory, kde vykonal 7 pridanie a 1 odobranie
  1. 6 0
      ChangeLog
  2. 1 1
      main/archives.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Mon May 28 16:27:43 CDT 2001 Adam Heath <doogie@debian.org>
+
+  * main/archives.c: If extracting a directory, and it doesn't already
+    exist on disk, and is shared with another package, don't error cause an
+    error.
+
 Mon May 28 16:23:26 CDT 2001 Adam Heath <doogie@debian.org>
 
   * doc/ja/822-date.1, doc/ja/Makefile.in, doc/ja/cleanup-info.8,

+ 1 - 1
main/archives.c

@@ -440,7 +440,7 @@ int tarobject(struct TarInfo *ti) {
           printf(_("Replacing files in old package %s ...\n"),otherpkg->name);
           otherpkg->clientdata->replacingfilesandsaid= 1;
         } else {
-          if (S_ISDIR(stab.st_mode)) {
+          if (!statr && S_ISDIR(stab.st_mode)) {
             forcibleerr(fc_overwritedir, _("trying to overwrite directory `%.250s' "
                         "in package %.250s with nondirectory"),
                         nifd->namenode->name,otherpkg->name);