Blame SOURCES/cdrkit-1.1.11-rootstat.patch
|
|
395898 |
diff -up cdrkit-1.1.11/genisoimage/tree.c.rootstat cdrkit-1.1.11/genisoimage/tree.c
|
|
|
395898 |
--- cdrkit-1.1.11/genisoimage/tree.c.rootstat 2011-01-25 14:15:36.766389403 +0100
|
|
|
395898 |
+++ cdrkit-1.1.11/genisoimage/tree.c 2011-01-25 14:17:24.804643126 +0100
|
|
|
395898 |
@@ -48,6 +48,7 @@
|
|
|
395898 |
#include <fctldefs.h>
|
|
|
395898 |
#include <device.h>
|
|
|
395898 |
#include <schily.h>
|
|
|
395898 |
+#include <libgen.h>
|
|
|
395898 |
|
|
|
395898 |
extern int allow_limited_size;
|
|
|
395898 |
|
|
|
395898 |
@@ -1421,12 +1422,16 @@ insert_file_entry(struct directory *this
|
|
|
395898 |
return (0);
|
|
|
395898 |
}
|
|
|
395898 |
if (this_dir == root && strcmp(short_name, ".") == 0)
|
|
|
395898 |
- root_statbuf = statbuf; /* Save this for later on */
|
|
|
395898 |
+ memcpy(&root_statbuf, &statbuf, sizeof(root_statbuf)); /* Save this for later on */
|
|
|
395898 |
|
|
|
395898 |
/* We do this to make sure that the root entries are consistent */
|
|
|
395898 |
if (this_dir == root && strcmp(short_name, "..") == 0) {
|
|
|
395898 |
- statbuf = root_statbuf;
|
|
|
395898 |
- lstatbuf = root_statbuf;
|
|
|
395898 |
+ /* for the case .. comes before . */
|
|
|
395898 |
+ if (!root_statbuf.st_ctime) {
|
|
|
395898 |
+ stat_filter(dirname(whole_path), &root_statbuf);
|
|
|
395898 |
+ }
|
|
|
395898 |
+ memcpy(&statbuf, &root_statbuf, sizeof(statbuf));
|
|
|
395898 |
+ memcpy(&lstatbuf, &root_statbuf, sizeof(lstatbuf));
|
|
|
395898 |
}
|
|
|
395898 |
if (S_ISLNK(lstatbuf.st_mode)) {
|
|
|
395898 |
|