From 2365649f866ff8a8d7bbde2e621f1a9550fd7e78 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Tue, 29 Jul 2014 08:43:34 -0500 Subject: [PATCH] fixes #53 --- resources/lib/vfs.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/vfs.py b/resources/lib/vfs.py index 3bcca7c..2c3eced 100644 --- a/resources/lib/vfs.py +++ b/resources/lib/vfs.py @@ -131,6 +131,13 @@ class DropboxFileSystem(Vfs): def rmdir(self,directory): directory = self._fix_slashes(directory) if(self.client != None and self.exists(directory)): + #dropbox is stupid and will refuse to do this sometimes, need to delete recursively + dirs,files = self.listdir(directory) + + for aDir in dirs: + self.rmdir(aDir) + + #finally remove the root directory self.client.file_delete(directory) else: return False