diff options
author | George Hazan <george.hazan@gmail.com> | 2023-07-13 21:03:40 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-07-13 21:03:40 +0300 |
commit | aaa9949ab7164947699377d3cef239523e8e5681 (patch) | |
tree | 8ab829bf72df6c235921e20f46984a7b4407854d /src | |
parent | c1e60721e900cb28c4e39d106e65549d3579ccfc (diff) |
code cleaning
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/srmm_util.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mir_app/src/srmm_util.cpp b/src/mir_app/src/srmm_util.cpp index 460c5be50d..24f1ff1674 100644 --- a/src/mir_app/src/srmm_util.cpp +++ b/src/mir_app/src/srmm_util.cpp @@ -136,12 +136,11 @@ MIR_APP_DLL(void) Srmm_DownloadOfflineFile(MEVENT hDbEvent, bool bOpen) struct _stat st = {};
_wstat(tszFilePath, &st);
if (st.st_size && st.st_size == blob.getSize() && blob.isCompleted()) {
- if (bOpen)
- ShellExecuteW(nullptr, L"open", tszFilePath.c_str(), nullptr, nullptr, SW_SHOWDEFAULT);
+ OFDTHREAD(hDbEvent, tszFilePath, bOpen).Finish();
}
else {
- OFDTHREAD *dt = new OFDTHREAD(hDbEvent, tszFilePath, bOpen);
- CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)dt, 0);
+ OFDTHREAD *ofd = new OFDTHREAD(hDbEvent, tszFilePath, bOpen);
+ CallProtoService(dbei.szModule, PS_OFFLINEFILE, (WPARAM)ofd, 0);
}
}
|