• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29513 (tree)
Time2022-12-23 18:44:20
Authorstefankueng

Log Message

don't store the temp file path in the CTempFiles singleton, remove the file manually

Change Summary

Incremental Difference

--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29512)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 29513)
@@ -8829,7 +8829,7 @@
88298829 {
88308830 CString sDataFilePath = CPathUtils::GetAppDataDirectory();
88318831 sDataFilePath += L"\\MonitoringData.ini";
8832- CString sTempfile = CTempFiles::Instance().GetTempFilePathString();
8832+ CString sTempfile = CTempFiles::Instance().GetTempFilePathString(false);
88338833 FILE* pFile = nullptr;
88348834 errno_t err = 0;
88358835 int retrycount = 5;
@@ -8851,11 +8851,15 @@
88518851 {
88528852 if (!MoveFileEx(sTempfile, sDataFilePath, MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH))
88538853 {
8854+ DeleteFile(sTempfile);
88548855 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": Error copying %s to %s, Error: %u\n", static_cast<LPCWSTR>(sTempfile), static_cast<LPCWSTR>(sDataFilePath), GetLastError());
88558856 }
88568857 }
88578858 else
8859+ {
8860+ DeleteFile(sTempfile);
88588861 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) L": Error saving %s - saving failed\n", static_cast<LPCWSTR>(sTempfile));
8862+ }
88598863 SyncCommand syncCmd;
88608864 syncCmd.Execute();
88618865 }
Show on old repository browser