From 6d8df8cd307b2fe219134ceb45c0e458b7471236 Mon Sep 17 00:00:00 2001 From: stack Date: Thu, 24 Jul 2014 23:45:40 +0200 Subject: [PATCH] accomodate new linux dropbox dir path instance1 --- dboxswitch/profhandler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dboxswitch/profhandler.py b/dboxswitch/profhandler.py index f2be538..8802f1f 100644 --- a/dboxswitch/profhandler.py +++ b/dboxswitch/profhandler.py @@ -159,7 +159,11 @@ class ProfHandler(): def getDropboxDirectory(self): pl = platform.system() if pl in ('Linux', 'Darwin'): - return os.path.join(os.path.expanduser('~'),".dropbox") + basepath = os.path.join(os.path.expanduser("~"), ".dropbox") + for path in [os.path.join(basepath, "instance1"), basepath]: + if os.path.exists(path): + return path + raise NotImplementedError("Path not found " + basepath + "[instance1]") elif pl == 'Windows': assert os.environ.has_key('APPDATA'), Exception('APPDATA env variable not found') return os.path.join(os.environ['APPDATA'],'Dropbox') -- 2.20.1