Add some prototype UI for overwriting saves

This commit is contained in:
Henrik Rydgård
2024-09-05 20:52:12 +02:00
parent 3a047369fd
commit f38cc4a959
3 changed files with 30 additions and 1 deletions
+9 -1
View File
@@ -24,13 +24,15 @@
#include <set>
#include <sstream>
#include <thread>
#include <sys/types.h>
#include <sys/utime.h>
#ifdef SHARED_LIBZIP
#include <zip.h>
#else
#include "ext/libzip/zip.h"
#endif
#ifdef _WIN32
#include "Common/CommonWindows.h"
#endif
#include "Common/Data/Encoding/Utf8.h"
@@ -652,8 +654,14 @@ bool GameManager::ExtractFile(struct zip *z, int file_index, const Path &outFile
*bytesCopied += readSize;
installProgress_ = (float)*bytesCopied / (float)allBytes;
}
zip_fclose(zf);
fclose(f);
// Copy the mtime, too. May not be possible on Android?
if (zstat.mtime) {
File::ChangeMTime(outFilename, zstat.mtime);
}
delete[] buffer;
return true;
} else {