fix import of files with dodgy filenames

This commit is contained in:
Steffen Schaumburg 2011-04-10 16:02:03 +02:00
parent e18abe9168
commit f6e21dabc5

View File

@ -175,7 +175,7 @@ class Importer:
def addFileToList(self, file, site, filter): def addFileToList(self, file, site, filter):
now = datetime.datetime.utcnow() now = datetime.datetime.utcnow()
file = os.path.splitext(os.path.basename(file))[0] 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() self.database.commit()
return [site] + [filter] + [id] return [site] + [filter] + [id]