diff options
author | hut <hut@lavabit.com> | 2010-05-06 02:00:19 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-05-06 02:00:19 +0200 |
commit | 83f08a2c6fb92269031af2991eed3c26ec816d3d (patch) | |
tree | df9f122a81a0c3b4e56413ceafe79da0d19c274c /ranger/fsobject/directory.py | |
parent | 4ffef98ccdc5abb1352697bc92cd507d17d7946f (diff) | |
download | ranger-83f08a2c6fb92269031af2991eed3c26ec816d3d.tar.gz |
fsobject: don't unnecessarily use abspath() in __init__
Diffstat (limited to 'ranger/fsobject/directory.py')
-rw-r--r-- | ranger/fsobject/directory.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index 9d12af28..5acf6ca7 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -81,11 +81,11 @@ class Directory(FileSystemObject, Accumulator, SettingsAware): 'type': lambda path: path.mimetype, } - def __init__(self, path, preload=None): + def __init__(self, path, **kw): assert not os.path.isfile(path), "No directory given!" Accumulator.__init__(self) - FileSystemObject.__init__(self, path, preload=preload) + FileSystemObject.__init__(self, path, **kw) self.marked_items = list() @@ -196,9 +196,10 @@ class Directory(FileSystemObject, Accumulator, SettingsAware): try: item = self.fm.env.get_directory(name) except: - item = Directory(name, preload=stats) + item = Directory(name, preload=stats, + path_is_abs=True) else: - item = File(name, preload=stats) + item = File(name, preload=stats, path_is_abs=True) item.load_if_outdated() files.append(item) yield |