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