[meld/meld-3-16] 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/meld-3-16] meldbuffer: Don't update recorded disk mtime for errors/missing files
- Date: Sat, 17 Jun 2017 00:18:28 +0000 (UTC)
commit 628f2bb0b8b4c6da9d200877f65a6935a6759a1c
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 0e7a935..df83f96 100644
--- a/meld/meldbuffer.py
+++ b/meld/meldbuffer.py
@@ -167,7 +167,7 @@ class MeldBufferData(GObject.GObject):
mtime = self._query_mtime(f)
if self._disk_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]