diff options
-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 |