mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
detect dropbox location
This commit is contained in:
parent
462cfa5b83
commit
7a7c1d3b0d
1 changed files with 11 additions and 7 deletions
|
@ -2978,13 +2978,17 @@ to work with this version of Anki."""))
|
|||
shutil.rmtree(from_, ignore_errors=True)
|
||||
|
||||
def dropboxFolder(self):
|
||||
if sys.platform.startswith("win32"):
|
||||
s = QSettings(QSettings.UserScope, "Microsoft", "Windows")
|
||||
s.beginGroup("CurrentVersion/Explorer/Shell Folders")
|
||||
p = os.path.join(unicode(s.value("Personal").toString()),
|
||||
"My Dropbox")
|
||||
else:
|
||||
p = os.path.expanduser("~/Dropbox")
|
||||
try:
|
||||
import ankiqt.ui.dropbox as db
|
||||
p = db.getPath()
|
||||
except:
|
||||
if sys.platform.startswith("win32"):
|
||||
s = QSettings(QSettings.UserScope, "Microsoft", "Windows")
|
||||
s.beginGroup("CurrentVersion/Explorer/Shell Folders")
|
||||
p = os.path.join(unicode(s.value("Personal").toString()),
|
||||
"My Dropbox")
|
||||
else:
|
||||
p = os.path.expanduser("~/Dropbox")
|
||||
return p
|
||||
|
||||
def setupDropbox(self, deck):
|
||||
|
|
Loading…
Reference in a new issue