| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e7c66a2 commit 084cfc7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -379,11 +379,11 @@ def dbTableValues(self, tableValues): | |||
| 379 | 379 | self._write(tableValues, content_type=CONTENT_TYPE.DUMP_TABLE) | |
| 380 | 380 | return | |
| 381 | 381 | ||
| 382 | + dumpDbPath = "%s%s%s" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db)) | ||
| 383 | + | ||
| 382 | 384 | if conf.dumpFormat == DUMP_FORMAT.SQLITE: | |
| 383 | 385 | replication = Replication("%s%s%s.sqlite3" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db))) | |
| 384 | 386 | elif conf.dumpFormat in (DUMP_FORMAT.CSV, DUMP_FORMAT.HTML): | |
| 385 | - dumpDbPath = "%s%s%s" % (conf.dumpPath, os.sep, unsafeSQLIdentificatorNaming(db)) | ||
| 386 | - | ||
| 387 | 387 | if not os.path.isdir(dumpDbPath): | |
| 388 | 388 | os.makedirs(dumpDbPath, 0755) | |
| 389 | 389 | ||
@@ -522,6 +522,9 @@ def dbTableValues(self, tableValues): | |||
| 522 | 522 | if len(value) > MIN_BINARY_DISK_DUMP_SIZE and r'\x' in value: | |
| 523 | 523 | mimetype = magic.from_buffer(value, mime=True) | |
| 524 | 524 | if any(mimetype.startswith(_) for _ in ("application", "image")): | |
| 525 | + if not os.path.isdir(dumpDbPath): | ||
| 526 | + os.makedirs(dumpDbPath, 0755) | ||
| 527 | + | ||
| 525 | 528 | filepath = os.path.join(dumpDbPath, "%s-%d.bin" % (column, randomInt(8))) | |
| 526 | 529 | warnMsg = "writing binary ('%s') content to file '%s' " % (mimetype, filepath) | |
| 527 | 530 | logger.warn(warnMsg) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments