combox

split and encrypted files between online file storage providers
git clone git://git.ricketyspace.net/combox.git
Log | Files | Refs

commit 4eb411af162c1df9e3b6783a9c195b59c143970f
parent 2c7c011d68691ffe3aa7d308479e7204c2727617
Author: Siddharth Ravikumar <sravik@bgsu.edu>
Date:   Fri,  6 Mar 2015 08:35:02 -0500

updated the on_delete method in the combox.events.ComboxDirMonitor class.

It now deletes the directory or file shard in the node directories
only if they were not already deleted.

	modified:   combox/events.py

Diffstat:
combox/events.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/combox/events.py b/combox/events.py @@ -148,10 +148,13 @@ class ComboxDirMonitor(LoggingEventHandler): super(ComboxDirMonitor, self).on_deleted(event) self.silo_update() - if event.is_directory: + file_node_path = node_path(event.src_path, self.config, + not event.is_directory) + + if event.is_directory and (path.exists(file_node_path)): # Delete corresponding directory in the nodes. rm_nodedir(event.src_path, self.config) - else: + elif(not event.is_directory) and (path.exists(file_node_path)): # remove the corresponding file shards in the node # directories. rm_shards(event.src_path, self.config)