Skip to content

Commit

Permalink
Merge pull request #124 from EBISPOT/dev
Browse files Browse the repository at this point in the history
fix file paths
  • Loading branch information
jdhayhurst authored Sep 2, 2022
2 parents 8fdf7d7 + e6470d5 commit 87b8679
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ftpSummaryStatsScript/ftp_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,13 @@ def release_files_for_harmonisation(self):
for study in self.get_files_to_harmonise():
logger.info("{} --> harmonisation queue".format(study))
source = self.staging_studies_dict[study]
dest_dir = self.harmonise_path + "/"
dest_dir = os.path.join(self.harmonise_path, study)
self.make_dir(dest_dir)
self.rsync_dir(source, dest_dir)

def update_lastrun_file(self):
datestamp = self.generate_datestamp()
with open(file, "a+") as f:
with open(self.lastrun_file, "a+") as f:
f.write(datestamp + '\n')

@staticmethod
Expand Down Expand Up @@ -270,7 +271,7 @@ def sync_to_ftp(self):
self._generate_md5sums_for_contents(source)
pardir = self._create_pardir_on_dest(source)
if pardir:
dest_dir = os.path.join(self.pardir, study + "/")
dest_dir = os.path.join(pardir, study + "/")
self.rsync_dir(source, dest_dir)
logger.info("==========================================")

Expand Down

0 comments on commit 87b8679

Please sign in to comment.