v.licheni.net
/
stack
/
code
/
dboxswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf8352c
)
accomodate new linux dropbox dir path instance1
author
stack
<stack@inventati.org>
Thu, 24 Jul 2014 21:45:40 +0000
(23:45 +0200)
committer
stack
<stack@inventati.org>
Thu, 24 Jul 2014 21:45:40 +0000
(23:45 +0200)
dboxswitch/profhandler.py
patch
|
blob
|
history
diff --git
a/dboxswitch/profhandler.py
b/dboxswitch/profhandler.py
index
f2be538
..
8802f1f
100644
(file)
--- 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'):
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')
elif pl == 'Windows':
assert os.environ.has_key('APPDATA'), Exception('APPDATA env variable not found')
return os.path.join(os.environ['APPDATA'],'Dropbox')