Created
June 7, 2022 10:46
-
-
Save v-atamanenko/22b8f417b6da3a14506707db543354ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 28a5903a804d62a6842f212831bcf3a85528ce77 | |
Author: v-atamanenko <[email protected]> | |
Date: Tue Jun 7 14:44:47 2022 +0400 | |
fix utime | |
diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h | |
index 0a5560b24..ede0db304 100644 | |
--- a/contrib/zip/src/miniz.h | |
+++ b/contrib/zip/src/miniz.h | |
@@ -4494,7 +4494,7 @@ static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, | |
t.actime = access_time; | |
t.modtime = modified_time; | |
- return !utime(pFilename, &t); | |
+ return 1; | |
} | |
#endif /* #ifndef MINIZ_NO_STDIO */ | |
#endif /* #ifndef MINIZ_NO_TIME */ | |
diff --git a/contrib/zlib/contrib/minizip/miniunz.c b/contrib/zlib/contrib/minizip/miniunz.c | |
index 3d65401be..1d90602cd 100644 | |
--- a/contrib/zlib/contrib/minizip/miniunz.c | |
+++ b/contrib/zlib/contrib/minizip/miniunz.c | |
@@ -98,21 +98,7 @@ void change_file_date(filename,dosdate,tmu_date) | |
CloseHandle(hFile); | |
#else | |
#ifdef unix || __APPLE__ | |
- struct utimbuf ut; | |
- struct tm newdate; | |
- newdate.tm_sec = tmu_date.tm_sec; | |
- newdate.tm_min=tmu_date.tm_min; | |
- newdate.tm_hour=tmu_date.tm_hour; | |
- newdate.tm_mday=tmu_date.tm_mday; | |
- newdate.tm_mon=tmu_date.tm_mon; | |
- if (tmu_date.tm_year > 1900) | |
- newdate.tm_year=tmu_date.tm_year - 1900; | |
- else | |
- newdate.tm_year=tmu_date.tm_year ; | |
- newdate.tm_isdst=-1; | |
- | |
- ut.actime=ut.modtime=mktime(&newdate); | |
- utime(filename,&ut); | |
+ // do nothing | |
#endif | |
#endif | |
} | |
diff --git a/contrib/zlib/contrib/untgz/untgz.c b/contrib/zlib/contrib/untgz/untgz.c | |
index 2c391e598..90e684cec 100644 | |
--- a/contrib/zlib/contrib/untgz/untgz.c | |
+++ b/contrib/zlib/contrib/untgz/untgz.c | |
@@ -243,7 +243,7 @@ int setfiletime (char *fname,time_t ftime) | |
struct utimbuf settime; | |
settime.actime = settime.modtime = ftime; | |
- return utime(fname,&settime); | |
+ return 0; | |
#endif | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment