diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-02-12 23:56:09 +0100 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-02-12 23:56:09 +0100 |
| commit | b38a26c2bc731ad123365e7f164d1a9ed0c89b6a (patch) | |
| tree | 95d6dac30c7aa27cac80550b67d702db673f1307 /src/shared/directoryentry.cpp | |
| parent | 5eb686ac48cd29cc00aec546805ed2be005d944b (diff) | |
Performance improvements:
* Avoid accessing disk for finding archives if archive parsing is disabled.
* Avoid very expensive createFile() call in removeOrigin(), after disabling a mod or closing modinfodialog.
Diffstat (limited to 'src/shared/directoryentry.cpp')
| -rw-r--r-- | src/shared/directoryentry.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index 9f54e526..8fc63188 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -313,18 +313,18 @@ bool FileEntry::removeOrigin(int origin) m_Origin = currentID;
// now we need to update the file time...
- std::wstring filePath = getFullPath();
- HANDLE file = ::CreateFile(filePath.c_str(), GENERIC_READ | GENERIC_WRITE,
- 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
- if (!::GetFileTime(file, nullptr, nullptr, &m_FileTime)) {
+ //std::wstring filePath = getFullPath();
+ //HANDLE file = ::CreateFile(filePath.c_str(), GENERIC_READ | GENERIC_WRITE,
+ // 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
+ //if (!::GetFileTime(file, nullptr, nullptr, &m_FileTime)) {
// maybe this file is in a bsa, but there is no easy way to find out which. User should refresh
// the view to find out
//m_Archive = std::pair<std::wstring, int>(L"bsa?", -1);
- } else {
+ //} else {
//m_Archive = std::pair<std::wstring, int>(L"", -1);
- }
+ //}
- ::CloseHandle(file);
+ //::CloseHandle(file);
} else {
m_Origin = -1;
|
