Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2f1607b

Browse files
committed
Minor fix for dumping non-alphanumeric database names
1 parent abd7608 commit 2f1607b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/core/dump.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import cgi
99
import codecs
1010
import os
11+
import re
1112
import threading
1213

1314
from lib.core.common import Backend
@@ -379,7 +380,7 @@ def dbTableValues(self, tableValues):
379380
self._write(tableValues, content_type=CONTENT_TYPE.DUMP_TABLE)
380381
return
381382

382-
dumpDbPath = "%s%s%s" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db))
383+
dumpDbPath = "%s%s%s" % (conf.dumpPath, os.sep, re.sub(r"[^\w]", "_", unsafeSQLIdentificatorNaming(db)))
383384

384385
if conf.dumpFormat == DUMP_FORMAT.SQLITE:
385386
replication = Replication("%s%s%s.sqlite3" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db)))

0 commit comments

Comments
 (0)