From 524ae1eb990813e9ccda3fdd537929eeff705aac Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Wed, 26 Aug 2015 14:11:16 -0400 Subject: combox/events.py: bugfix (Dropbox specific code). --- combox/events.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/combox/events.py b/combox/events.py index de0196d..ea68c8d 100644 --- a/combox/events.py +++ b/combox/events.py @@ -316,7 +316,7 @@ class NodeDirMonitor(LoggingEventHandler): cb_filename = dest_cb_path elif (self.shardp(event.src_path) and self.shardp(event.dest_path) and - '.dropbox_cache' in event.dest_path and + '.dropbox.cache' in event.dest_path and not event.is_directory): # This is Dropbox specific :| # @@ -340,14 +340,16 @@ class NodeDirMonitor(LoggingEventHandler): # update db. self.silo.update(cb_filename) self.silo.node_rem('file_created', cb_filename) + return elif silo_node_dict == 'file_deleted': - # This is Dropbox specify :| + # This is Dropbox specific :| # remove the corresponding file under the combox # directory. rm_path(cb_filename) # remove file info from silo. self.silo.remove(cb_filename) self.silo.node_rem('file_deleted', cb_filename) + return else: try: os.rename(src_cb_path, dest_cb_path) -- cgit v1.2.3