diff --git a/parsl/channels/local/local.py b/parsl/channels/local/local.py index 161d1cd448..5cd48f6fdf 100644 --- a/parsl/channels/local/local.py +++ b/parsl/channels/local/local.py @@ -94,7 +94,7 @@ def push_file(self, source, dest_dir): - FileCopyException : If file copy failed. ''' - local_dest = dest_dir + '/' + os.path.basename(source) + local_dest = os.path.join(dest_dir, os.path.basename(source)) # Only attempt to copy if the target dir and source dir are different if os.path.dirname(source) != dest_dir: diff --git a/parsl/channels/ssh/ssh.py b/parsl/channels/ssh/ssh.py index 0ce7ff5314..51b653996a 100644 --- a/parsl/channels/ssh/ssh.py +++ b/parsl/channels/ssh/ssh.py @@ -160,7 +160,7 @@ def push_file(self, local_source, remote_dir): - FileCopyException : FileCopy failed. ''' - remote_dest = remote_dir + '/' + os.path.basename(local_source) + remote_dest = os.path.join(remote_dir, os.path.basename(local_source)) try: self.makedirs(remote_dir, exist_ok=True) @@ -200,7 +200,7 @@ def pull_file(self, remote_source, local_dir): - FileCopyException : FileCopy failed. ''' - local_dest = local_dir + '/' + os.path.basename(remote_source) + local_dest = os.path.join(local_dir, os.path.basename(remote_source)) try: os.makedirs(local_dir)