summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/metadata.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ranger/core/metadata.py b/ranger/core/metadata.py
index efee9760..fc545b9c 100644
--- a/ranger/core/metadata.py
+++ b/ranger/core/metadata.py
@@ -70,6 +70,16 @@ class MetadataManager(object):
             if value == "":
                 del entry[key]
 
+        # If file's metadata become empty after an update, remove it entirely
+        if entry == {}:
+            try:
+                del entries[filename]
+            except KeyError:
+                try:
+                    del entries[basename(filename)]
+                except KeyError:
+                    pass
+
         # Full update of the cache, to be on the safe side:
         self.metadata_cache[filename] = entry
         self.metafile_cache[metafile] = entries
O?h=v1.8.0&id=22449efdeaec4ae089a6461ab93700536b5ea1bd'>^
e92fe17a ^
e92fe17a ^
b5493fe4 ^

ef0ee843 ^
0b8a9d79 ^
a6791aee ^
23236d0c ^
08f21ae5 ^
4b826595 ^
757e1f55 ^
277ecc9e ^
9983328c ^
33cb688a ^
a1274aba ^
b42eb058 ^
b13518af ^
509afd70 ^
fc486c60 ^
b4934e42 ^
2c1d2db0 ^
291ca616 ^
50845f37 ^
039c03ef ^
af6658b3 ^
efe2d7a3 ^
4be8b401 ^



d955e3f0 ^
75013dc7 ^
67bb838c ^
a808a661 ^
bba8d293 ^
2a64495f ^
5e449699 ^
fc486c60 ^
7b04e507 ^
0268e3c3 ^
efe2d7a3 ^
6f43de0a ^




fca1fc4f ^
f70ee6b2 ^
0db4c9b2 ^
b2d63ef5 ^
291ca616 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64