]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/cdrkit/cdrkit-1.1.11-rootstat.patch
Remove dvdrtools for cdrkit
[ipfire-2.x.git] / src / patches / cdrkit / cdrkit-1.1.11-rootstat.patch
diff --git a/src/patches/cdrkit/cdrkit-1.1.11-rootstat.patch b/src/patches/cdrkit/cdrkit-1.1.11-rootstat.patch
new file mode 100644 (file)
index 0000000..d9ceb3b
--- /dev/null
@@ -0,0 +1,31 @@
+diff -up cdrkit-1.1.11/genisoimage/tree.c.rootstat cdrkit-1.1.11/genisoimage/tree.c
+--- cdrkit-1.1.11/genisoimage/tree.c.rootstat  2011-01-25 14:15:36.766389403 +0100
++++ cdrkit-1.1.11/genisoimage/tree.c   2011-01-25 14:17:24.804643126 +0100
+@@ -48,6 +48,7 @@
+ #include <fctldefs.h>
+ #include <device.h>
+ #include <schily.h>
++#include <libgen.h>
+ extern int allow_limited_size;
+@@ -1421,12 +1422,16 @@ insert_file_entry(struct directory *this
+               return (0);
+       }
+       if (this_dir == root && strcmp(short_name, ".") == 0)
+-              root_statbuf = statbuf; /* Save this for later on */
++              memcpy(&root_statbuf, &statbuf, sizeof(root_statbuf));  /* Save this for later on */
+       /* We do this to make sure that the root entries are consistent */
+       if (this_dir == root && strcmp(short_name, "..") == 0) {
+-              statbuf = root_statbuf;
+-              lstatbuf = root_statbuf;
++              /* for the case .. comes before . */
++              if (!root_statbuf.st_ctime) {
++                      stat_filter(dirname(whole_path), &root_statbuf);
++              }
++              memcpy(&statbuf, &root_statbuf, sizeof(statbuf));
++              memcpy(&lstatbuf, &root_statbuf, sizeof(lstatbuf));
+       }
+       if (S_ISLNK(lstatbuf.st_mode)) {