Skip to content

Commit

Permalink
Merge pull request #4 from lilab-bcb/develop
Browse files Browse the repository at this point in the history
make behavior of sync command consistent across backends
  • Loading branch information
yihming authored Oct 18, 2021
2 parents 045cdd7 + 65bea48 commit c79649a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions strato/backends/_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ def copy(self, recursive, parallel, ionice, filenames):
check_call(call_args)

def sync(self, parallel, ionice, source, target):
# If target folder is local.
if len(target.split('://')) == 1:
import os
if not os.path.exists(target):
os.mkdir(target)

call_args = ['ionice', '-c', '2', '-n', '7'] if ionice and (shutil.which('ionice') != None) else []
call_args += self._call_prefix
if parallel:
Expand Down

0 comments on commit c79649a

Please sign in to comment.