Create the file directory.
()
| 604 | logger.info("using '%s' as the CSV results file in multiple targets mode" % conf.resultsFile) |
| 605 | |
| 606 | def _createFilesDir(): |
| 607 | """ |
| 608 | Create the file directory. |
| 609 | """ |
| 610 | |
| 611 | if not any((conf.fileRead, conf.commonFiles)): |
| 612 | return |
| 613 | |
| 614 | conf.filePath = paths.SQLMAP_FILES_PATH % conf.hostname |
| 615 | |
| 616 | if not os.path.isdir(conf.filePath): |
| 617 | try: |
| 618 | os.makedirs(conf.filePath) |
| 619 | except OSError as ex: |
| 620 | tempDir = tempfile.mkdtemp(prefix="sqlmapfiles") |
| 621 | warnMsg = "unable to create files directory " |
| 622 | warnMsg += "'%s' (%s). " % (conf.filePath, getUnicode(ex)) |
| 623 | warnMsg += "Using temporary directory '%s' instead" % getUnicode(tempDir) |
| 624 | logger.warning(warnMsg) |
| 625 | |
| 626 | conf.filePath = tempDir |
| 627 | |
| 628 | def _createDumpDir(): |
| 629 | """ |
no test coverage detected
searching dependent graphs…