Skip to content

Commit

Permalink
remove usage of std::chrono when writing tspack
Browse files Browse the repository at this point in the history
  • Loading branch information
marzent committed Feb 11, 2024
1 parent cb2faa6 commit a303cea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion DalamudCrashHandler/DalamudCrashHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,14 @@ void export_tspack(HWND hWndParent, const std::filesystem::path& logDir, const s
}

auto handleInfo = HandleAndBaseOffset{.h = hLogFile, .off = baseOffset.QuadPart};
const auto modt = std::chrono::system_clock::to_time_t(std::chrono::clock_cast<std::chrono::system_clock>(last_write_time(logFilePath)));
WIN32_FILE_ATTRIBUTE_DATA fileInfo = { 0 };
time_t modt = time(nullptr);
if (GetFileAttributesExW(logFilePath.c_str(), GetFileExInfoStandard, &fileInfo)) {
ULARGE_INTEGER ull = { 0 };
ull.LowPart = fileInfo.ftLastWriteTime.dwLowDateTime;
ull.HighPart = fileInfo.ftLastWriteTime.dwHighDateTime;
modt = ull.QuadPart / 10000000ULL - 11644473600ULL;
}
mz_throw_if_failed(mz_zip_writer_add_read_buf_callback(
&zipa,
pcszLogFileName,
Expand Down

0 comments on commit a303cea

Please sign in to comment.