From d3a428c9c8ebc8a0c95ebb091802a087c3297f10 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 20 Dec 2011 13:17:24 +0000 Subject: [PATCH] minor bug fix regarding dumping tables with safe quotes --- lib/core/dump.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index 373b25a80..0da0fd976 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -19,6 +19,7 @@ from lib.core.common import normalizeUnicode from lib.core.common import openFile from lib.core.common import restoreDumpMarkedChars from lib.core.common import safeCSValue +from lib.core.common import unsafeSQLIdentificatorNaming from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger @@ -317,14 +318,14 @@ class Dump: table = tableValues["__infos__"]["table"] if conf.replicate: - replication = Replication("%s%s%s.sqlite3" % (conf.dumpPath, os.sep, db)) + replication = Replication("%s%s%s.sqlite3" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db))) else: - dumpDbPath = "%s%s%s" % (conf.dumpPath, os.sep, db) + dumpDbPath = "%s%s%s" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db)) if not os.path.isdir(dumpDbPath): os.makedirs(dumpDbPath, 0755) - dumpFileName = "%s%s%s.csv" % (dumpDbPath, os.sep, table) + dumpFileName = "%s%s%s.csv" % (dumpDbPath, os.sep, unsafeSQLIdentificatorNaming(table)) dumpFP = openFile(dumpFileName, "wb") count = int(tableValues["__infos__"]["count"])