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')