lib/bdsync/core.rb in bdsync-2.1.0 vs lib/bdsync/core.rb in bdsync-2.1.1

- old
+ new

@@ -85,11 +85,18 @@ end } next_level_dirs.sort.each { |path, remote| handle_remote_entry remote, path, :directory - traverse_remote_path path + + begin + traverse_remote_path path + rescue Net::SFTP::StatusException + # OK: the remote directory may be deleted with synchronization! + rescue Errno::ENOENT + # OK: the remote directory may be deleted with synchronization! + end } end def traverse_local_path local_path next_level_dirs = [] @@ -106,10 +113,15 @@ end } next_level_dirs.sort.each { |path| handle_local_entry path, :directory - traverse_local_path path + + begin + traverse_local_path path + rescue Errno::ENOENT + # OK: the local directory may be deleted with synchronization! + end } end def handle_remote_entry remote, path, type puts "#{'%9s' % type}: #{path}".green