...
 
Commits (1)
......@@ -68,6 +68,7 @@
#include "genwrap.h" /* strupr/strlwr */
#include "dirwrap.h" /* DLLCALL */
#include "filewrap.h" /* filetime() */
#if !defined(S_ISDIR)
#define S_ISDIR(x) ((x)&S_IFDIR)
......@@ -1221,6 +1222,7 @@ BOOL CopyFile(const char* src, const char* dest, BOOL failIfExists)
return FALSE;
}
time_t ftime = filetime(fileno(in));
while(!feof(in)) {
size_t rd = fread(buf, sizeof(uint8_t), sizeof(buf), in);
if(rd < 1)
......@@ -1234,6 +1236,7 @@ BOOL CopyFile(const char* src, const char* dest, BOOL failIfExists)
fclose(in);
fclose(out);
setfdate(dest,ftime);
return success;
}
......