MINGW-packages/mingw-w64-cabextract/001-fix-build-on-mingw.patch
مهدي شينون (Mehdi Chinoune) 76fd238163 [new-package] cabextract 1.11
2024-07-07 14:12:01 +01:00

19 lines
548 B
Diff

--- a/src/cabextract.c
+++ b/src/cabextract.c
@@ -1221,6 +1221,7 @@
* merely check if this path element is a directory */
ok = (stat(path, &st_buf) == 0) && S_ISDIR(st_buf.st_mode);
}
+#ifndef _WIN32
else {
/* in the archive-determined part of the path and not keeping symlinks:
* use lstat() and delete symlinks if found */
@@ -1230,6 +1231,7 @@
ok = S_ISDIR(st_buf.st_mode);
}
}
+#endif
if (!ok) ok = (mkdir(path, 0777 & ~user_umask) == 0);
*p = '/';
if (!ok) return 0;