1234567891011121314151617181920212223242526272829303132 |
- 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)) {
-
|