From 78af641b056ef460bf114c1cbaf300b011b54cb3 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Wed, 19 Aug 2026 14:22:35 +0200 Subject: [PATCH] Python3 fix: make sure file name is a string (not bytes) object --- cybertools/storage/filesystem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cybertools/storage/filesystem.py b/cybertools/storage/filesystem.py index 98128ee..04e4c55 100644 --- a/cybertools/storage/filesystem.py +++ b/cybertools/storage/filesystem.py @@ -28,13 +28,14 @@ class FileSystemStorage(object): self.subDir = subDir def getDir(self, address, subDir=None): + if isinstance(address, bytes): + address = address.decode('UTF-8') subDir = subDir or self.subDir - subDir = str(subDir) if self.rootDir is None: if subDir: return os.path.join(subDir, address) return address - return os.path.join(str(self.rootDir), subDir, address) + return os.path.join(self.rootDir, subDir, address) def setData(self, address, data, params={}): subDir = params.get('subdirectory')