diff options
author | hut <hut@lepus.uberspace.de> | 2015-01-17 02:42:27 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-01-17 02:42:27 +0100 |
commit | 4ee16ef9291005add76e3ff7ede61c9d7b52389c (patch) | |
tree | a343bc4273eeeecaee15637d53b9d01e190b7994 | |
parent | 85081e15ff35d8341472a20f0bec3e0d44630fde (diff) | |
download | ranger-4ee16ef9291005add76e3ff7ede61c9d7b52389c.tar.gz |
core.metadata: use basenames by default
-rw-r--r-- | ranger/core/metadata.py | 6 |
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 |