summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-01-17 02:42:27 +0100
committerhut <hut@lepus.uberspace.de>2015-01-17 02:42:27 +0100
commit4ee16ef9291005add76e3ff7ede61c9d7b52389c (patch)
treea343bc4273eeeecaee15637d53b9d01e190b7994
parent85081e15ff35d8341472a20f0bec3e0d44630fde (diff)
downloadranger-4ee16ef9291005add76e3ff7ede61c9d7b52389c.tar.gz
core.metadata: use basenames by default
-rw-r--r--ranger/core/metadata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/core/metadata.py b/ranger/core/metadata.py
index 48f15c3f..5b73e9dc 100644
--- a/ranger/core/metadata.py
+++ b/ranger/core/metadata.py
@@ -55,11 +55,13 @@ class MetadataManager(object):
         try:
             entry = entries[filename]
         except KeyError:
-            entry = {}
+            try:
+                entry = entries[basename(filename)]
+            except KeyError:
+                entry = entries[basename(filename)] = {}
         entry.update(update_dict)
 
         # Full update of the cache, to be on the safe side:
-        entries[filename] = entry
         self.metadata_cache[filename] = entry
         self.metafile_cache[metafile] = entries