Skip to content

Commit

Permalink
Enhabnce updateTimeStamp fuction
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Dec 20, 2024
1 parent f535087 commit cb1172e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PowerEditor/src/ScintillaComponent/Buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ void Buffer::updateTimeStamp()
msg += "TRUE";
else
msg += "FALSE";

if (bWorkerThreadTerminated)
{
msg += ", its worker thread had to be forcefully terminated due to timeout reached!";
Expand All @@ -184,9 +185,13 @@ void Buffer::updateTimeStamp()
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);

if (res == -1 || res == 1)
// (res == -1) => timeStampLive is later, it means the file has been modified outside of Notepad++ - usual case
//
Expand Down

0 comments on commit cb1172e

Please sign in to comment.