diff --git a/storage/README.txt b/storage/README.txt index 2260d04..34a4e5b 100644 --- a/storage/README.txt +++ b/storage/README.txt @@ -9,8 +9,8 @@ Controlling the storage of data >>> directory = os.path.dirname(storage.__file__) >>> from cybertools.storage.filesystem import explicitDirectoryStorage - >>> storage = explicitDirectoryStorage(os.path.sep.join((directory, 'testdata'))) + >>> storage = explicitDirectoryStorage(os.path.join(directory, 'testdata')) >>> storage.getDir('demo') - '/.../cybertools/storage/testdata/demo' + '/home/.../cybertools/storage/testdata/demo' diff --git a/storage/filesystem.py b/storage/filesystem.py index 6017410..562c7e4 100644 --- a/storage/filesystem.py +++ b/storage/filesystem.py @@ -39,8 +39,7 @@ class FileSystemStorage(object): def getDir(self, address, subDir=None): subDir = subDir or self.subDir - paths = [p for p in (self.rootDir, subDir, address) if p] - return os.path.sep.join(paths) + return os.path.join(self.rootDir, subDir, address) def setData(self, address, data, params={}): subDir = params.get('subdirectory')