mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #3729 from RaiKoHoff/Dev_RC
On file restore, do not notify immediately, but check against stored file attributes.
This commit is contained in:
commit
b03cdce9b7
@ -558,17 +558,17 @@ static inline bool HasCurrentFileChanged() {
|
||||
}
|
||||
WIN32_FIND_DATA fdUpdated = { 0 };
|
||||
if (!GetFileAttributesEx(Paths.CurrentFile, GetFileExInfoStandard, &fdUpdated)) {
|
||||
// The current file has been removed
|
||||
if (IsFileDeletedFlagSet()) {
|
||||
return false;
|
||||
} else {
|
||||
SetEvent(s_hEventFileChangedExt);
|
||||
SetEvent(s_hEventFileDeletedExt);
|
||||
return true; // The current file has been removed
|
||||
return true;
|
||||
}
|
||||
} else if (IsFileDeletedFlagSet()) {
|
||||
SetEvent(s_hEventFileChangedExt);
|
||||
// The current file has been restored
|
||||
ResetEvent(s_hEventFileDeletedExt);
|
||||
return true; // The current file has been restored
|
||||
}
|
||||
|
||||
bool const changed = (s_fdCurFile.nFileSizeLow != fdUpdated.nFileSizeLow) || (s_fdCurFile.nFileSizeHigh != fdUpdated.nFileSizeHigh)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user