mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 07:44:24 +02:00
Enhabnce updateTimeStamp fuction
Follow the disscussion: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15936#discussion_r1886067242 Close #15968
This commit is contained in:
parent
f535087e5d
commit
cb1172e2a4
@ -169,6 +169,7 @@ void Buffer::updateTimeStamp()
|
|||||||
msg += "TRUE";
|
msg += "TRUE";
|
||||||
else
|
else
|
||||||
msg += "FALSE";
|
msg += "FALSE";
|
||||||
|
|
||||||
if (bWorkerThreadTerminated)
|
if (bWorkerThreadTerminated)
|
||||||
{
|
{
|
||||||
msg += ", its worker thread had to be forcefully terminated due to timeout reached!";
|
msg += ", its worker thread had to be forcefully terminated due to timeout reached!";
|
||||||
@ -184,9 +185,13 @@ void Buffer::updateTimeStamp()
|
|||||||
writeLog(nppIssueLog.c_str(), msg.c_str());
|
writeLog(nppIssueLog.c_str(), msg.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if getting timestamp operation fails, no timestamp to compare then no need to continue
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LONG res = CompareFileTime(&_timeStamp, &timeStampLive);
|
LONG res = CompareFileTime(&_timeStamp, &timeStampLive);
|
||||||
|
|
||||||
if (res == -1 || res == 1)
|
if (res == -1 || res == 1)
|
||||||
// (res == -1) => timeStampLive is later, it means the file has been modified outside of Notepad++ - usual case
|
// (res == -1) => timeStampLive is later, it means the file has been modified outside of Notepad++ - usual case
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user