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