[meld/Python3] meldbuffer: Don't update recorded disk mtime for errors/missing files
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/Python3] meldbuffer: Don't update recorded disk mtime for errors/missing files
- Date: Sat, 9 Jul 2016 23:47:15 +0000 (UTC)
commit 1424df9654f99a05ce16b8fcf9a9d7fa1c3eab7b
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Jul 10 09:44:14 2016 +1000
meldbuffer: Don't update recorded disk mtime for errors/missing files
Most commonly this is an issue where a file notification event happens
for a deleted file that is then replaced by an external program. In
this case we don't want to invalidate our recorded on-disk mtime
because it's still the last valid time we saw for this file.
meld/meldbuffer.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/meldbuffer.py b/meld/meldbuffer.py
index 186d624..451a60e 100644
--- a/meld/meldbuffer.py
+++ b/meld/meldbuffer.py
@@ -164,7 +164,7 @@ class MeldBufferData(GObject.GObject):
mtime = self._query_mtime(f)
if self._disk_mtime and mtime and mtime > self._disk_mtime:
self.emit('file-changed')
- self._disk_mtime = mtime
+ self._disk_mtime = mtime or self._disk_mtime
@property
def gfile(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]