Skip to content

Commit

Permalink
Make dftimewolf directory if non-existent. (log2timeline#322)
Browse files Browse the repository at this point in the history
Could also just as easily replace the elif with else, as makedirs would make any missing ones.
  • Loading branch information
someguyiknow authored Aug 17, 2020
1 parent 6ddaad0 commit 07cdd31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dftimewolf/lib/exporters/local_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def SetUp(self, target_directory=None): # pylint: disable=arguments-differ
target_directory = tempfile.mkdtemp(prefix='dftimewolf_local_fs')
elif os.path.exists(target_directory):
target_directory = os.path.join(target_directory, 'dftimewolf')
os.makedirs(target_directory, exist_ok=True)
self._target_directory = target_directory

def Process(self):
Expand Down

0 comments on commit 07cdd31

Please sign in to comment.