cdrkit-1.1.11-rootstat.patch (1128B)
1 diff -up cdrkit-1.1.11/genisoimage/tree.c.rootstat cdrkit-1.1.11/genisoimage/tree.c 2 --- cdrkit-1.1.11/genisoimage/tree.c.rootstat 2011-01-25 14:15:36.766389403 +0100 3 +++ cdrkit-1.1.11/genisoimage/tree.c 2011-01-25 14:17:24.804643126 +0100 4 @@ -48,6 +48,7 @@ 5 #include <fctldefs.h> 6 #include <device.h> 7 #include <schily.h> 8 +#include <libgen.h> 9 10 extern int allow_limited_size; 11 12 @@ -1421,12 +1422,16 @@ insert_file_entry(struct directory *this 13 return (0); 14 } 15 if (this_dir == root && strcmp(short_name, ".") == 0) 16 - root_statbuf = statbuf; /* Save this for later on */ 17 + memcpy(&root_statbuf, &statbuf, sizeof(root_statbuf)); /* Save this for later on */ 18 19 /* We do this to make sure that the root entries are consistent */ 20 if (this_dir == root && strcmp(short_name, "..") == 0) { 21 - statbuf = root_statbuf; 22 - lstatbuf = root_statbuf; 23 + /* for the case .. comes before . */ 24 + if (!root_statbuf.st_ctime) { 25 + stat_filter(dirname(whole_path), &root_statbuf); 26 + } 27 + memcpy(&statbuf, &root_statbuf, sizeof(statbuf)); 28 + memcpy(&lstatbuf, &root_statbuf, sizeof(lstatbuf)); 29 } 30 if (S_ISLNK(lstatbuf.st_mode)) { 31