From f6e21dabc5235c96dafed3806b0df7d50be33822 Mon Sep 17 00:00:00 2001 From: Steffen Schaumburg Date: Sun, 10 Apr 2011 16:02:03 +0200 Subject: [PATCH] fix import of files with dodgy filenames --- pyfpdb/fpdb_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index 6d0ed3ab..788adb22 100644 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -175,7 +175,7 @@ class Importer: def addFileToList(self, file, site, filter): now = datetime.datetime.utcnow() file = os.path.splitext(os.path.basename(file))[0] - id = self.database.storeFile([file, site, now, now, 0, 0, 0, 0, 0, 0, False]) + id = self.database.storeFile([unicode(file, "utf8", "replace"), site, now, now, 0, 0, 0, 0, 0, 0, False]) self.database.commit() return [site] + [filter] + [id]