diff --git a/shanoir2bids.py b/shanoir2bids.py index bdaf86d..f3bf813 100755 --- a/shanoir2bids.py +++ b/shanoir2bids.py @@ -383,7 +383,10 @@ def set_log_filename(self): curr_time.minute, curr_time.second, ) - self.log_fn = opj(self.dl_dir, basename) + dir_log = opj(self.dl_dir, 'shanoir_downloader_logs') + if not ope(dir_log): + Path(dir_log).mkdir(parents=True, exist_ok=True) + self.log_fn = opj(self.dl_dir, 'shanoir_downloader_logs', basename) def toggle_longitudinal_version(self): self.longitudinal = True