on pull() return a boolean, if something was changed on disk or not
This commit is contained in:
parent
6b90e1d16c
commit
8a919ac866
1 changed files with 5 additions and 0 deletions
|
@ -689,6 +689,8 @@ class Client(object):
|
|||
def prune(src, exp):
|
||||
return [sub(exp, "", item) for item in src]
|
||||
|
||||
updated=False
|
||||
|
||||
urn = Urn(remote_directory, directory=True)
|
||||
|
||||
## here we check for the current directory
|
||||
|
@ -717,6 +719,7 @@ class Client(object):
|
|||
## no need to check it here
|
||||
if remote_urn.path().endswith("/"):
|
||||
if not os.path.exists(local_path):
|
||||
updated=True
|
||||
os.mkdir(local_path)
|
||||
## nevertheless, since we pull the directory, it will be checked up there
|
||||
self.pull(remote_directory=remote_path, local_directory=local_path)
|
||||
|
@ -724,6 +727,8 @@ class Client(object):
|
|||
if remote_resource_name in local_resource_names:
|
||||
continue
|
||||
self.download_file(remote_path=remote_path, local_path=local_path)
|
||||
updated=True
|
||||
return updated
|
||||
|
||||
def sync(self, remote_directory, local_directory):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue