Skip to content

Commit

Permalink
Fix error where we weren't correctly deleting files form slave on ful…
Browse files Browse the repository at this point in the history
…l rsync, even of configured to do so
  • Loading branch information
Gustavo Carvalho committed Apr 7, 2014
1 parent 490585c commit 9d467ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions RSync.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,18 @@ def sync_file(self, to_server=True):
self.run_rsync(call_params)

def sync_structure(self):
if not self.valid_file_to_process():
return
local_file = self.view.file_name()
local_path = self.local_path()
local_path = os.path.normpath(local_path) if local_path else ''
if not local_file or not rsyncpath or not local_path:
return
if not local_path.upper() in local_file.upper():
return

main_host = self.main_host()
if main_host:
remote_path = main_host.remote_path()
if not remote_path:
return
(first, second) = (remote_path + '/', local_path) if self.remote_is_master() else (local_path + '/',remote_path)
call_params = self.call_params(main_host, True, ['-r', first, second])
call_params = self.call_params(main_host, not self.remote_is_master(), ['-r', first, second])
self.log_status('RSync: {} [FULL SYNC: Please wait ... ]'.format(main_host.host_name()) )
sublime.set_timeout_async(lambda: self.run_rsync(call_params), 10)

Expand Down

0 comments on commit 9d467ba

Please sign in to comment.