From 4ee16ef9291005add76e3ff7ede61c9d7b52389c Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 17 Jan 2015 02:42:27 +0100 Subject: core.metadata: use basenames by default --- ranger/core/metadata.py | 6 ++++-- 1 file 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 -- cgit 1.4.1-2-gfad0