cdrkit/cdrkit-1.1.11-rootstat.patch
Petr Šabata e74c528fa3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/cdrkit#c47995e62aae3cb183ab87aac16c963e028f3d50
2020-10-14 22:39:15 +02:00

32 lines
1.1 KiB
Diff

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