Skip to content

Commit 664ec38

Browse files
authored
Merge pull request #89 from linted/master
Added check around try block to make the local directory the default
2 parents b91ce37 + be8e4b9 commit 664ec38

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

VHostScan/lib/helpers/file_helper.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ def __init__(self, output_file):
1515
def check_directory(self):
1616
directory = os.path.dirname(self.output_file)
1717

18-
try:
19-
os.stat(directory)
20-
except:
21-
os.mkdir(directory)
22-
print("[!] %s didn't exist and has been created." % directory)
18+
if directory != '':
19+
try:
20+
os.stat(directory)
21+
except:
22+
os.mkdir(directory)
23+
print("[!] %s didn't exist and has been created." % directory)
2324

2425
def is_json(json_file):
2526
try:

0 commit comments

Comments
 (0)