From d882f845ffa5025e741ab91fcb36e5055a2dd568 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Tue, 26 Feb 2013 21:17:38 +0100 Subject: [PATCH] Use os.path.join instead of hardcoded paths --- morituri/common/directory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/morituri/common/directory.py b/morituri/common/directory.py index 66fb510..e076a1f 100644 --- a/morituri/common/directory.py +++ b/morituri/common/directory.py @@ -34,7 +34,7 @@ class Directory(log.Loggable): path = os.path.join(directory, 'morituri.conf') self.info('Using XDG, configuration file is %s' % path) except ImportError: - path = os.path.expanduser('~/.moriturirc') + path = os.path.join(os.path.expanduser('~'), '.moriturirc') self.info('Not using XDG, configuration file is %s' % path) return path @@ -45,7 +45,7 @@ class Directory(log.Loggable): path = BaseDirectory.save_cache_path('morituri') self.info('Using XDG, cache directory is %s' % path) except ImportError: - path = os.path.expanduser('~/.morituri/cache') + path = os.path.join(os.path.expanduser('~'), '.morituri', 'cache') if not os.path.exists(path): os.makedirs(path) self.info('Not using XDG, cache directory is %s' % path) @@ -68,7 +68,7 @@ class Directory(log.Loggable): except ImportError: pass - path = os.path.expanduser('~/.morituri/cache') + path = os.path.join(os.path.expanduser('~'), '.morituri', 'cache') if os.path.exists(path): self.info('From before XDG, read cache directory is %s' % path) paths.append(path)