Add check that prevHash is actually recorded
This commit is contained in:
@@ -183,8 +183,7 @@ class NWDocument:
|
|||||||
# Re-read the document on disk to check if it has changed
|
# Re-read the document on disk to check if it has changed
|
||||||
prevHash = self._lastHash
|
prevHash = self._lastHash
|
||||||
self.readDocument()
|
self.readDocument()
|
||||||
print(f"'{self._lastHash}', '{prevHash}'")
|
if prevHash and self._lastHash != prevHash and not forceWrite:
|
||||||
if self._lastHash != prevHash and not forceWrite:
|
|
||||||
logger.error("File has been altered on disk since opened")
|
logger.error("File has been altered on disk since opened")
|
||||||
self._hashError = True
|
self._hashError = True
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user