From d21b4a8f80698506d5f966dbb74f235042626592 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sun, 8 Oct 2006 22:56:51 +0000 Subject: [PATCH] created cybertools.storage git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1396 fd906abe-77d9-0310-91a1-e0d9ade77398 --- storage/README.txt | 4 ++-- storage/filesystem.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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')