mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 23:57:13 -05:00
Merge branch 'master' of https://github.com/sobjornstad/anki
This commit is contained in:
commit
908c514e58
2 changed files with 8 additions and 4 deletions
|
|
@ -449,9 +449,6 @@ class Editor(object):
|
|||
txt = self.mungeHTML(txt)
|
||||
# misbehaving apps may include a null byte in the text
|
||||
txt = txt.replace("\x00", "")
|
||||
# reverse the url quoting we added to get images to display
|
||||
txt = unicode(urllib2.unquote(
|
||||
txt.encode("utf8")), "utf8", "replace")
|
||||
self.note.fields[self.currentField] = txt
|
||||
if not self.addMode:
|
||||
self.note.flush()
|
||||
|
|
|
|||
|
|
@ -224,7 +224,14 @@ and no other programs are accessing your profile folders, then try again."""))
|
|||
return p
|
||||
else:
|
||||
loc = QDesktopServices.storageLocation(QDesktopServices.DocumentsLocation)
|
||||
return os.path.join(loc, "Anki")
|
||||
if loc[:-1] == QDesktopServices.storageLocation(
|
||||
QDesktopServices.HomeLocation):
|
||||
# occasionally "documentsLocation" will return the home
|
||||
# folder because the Documents folder isn't configured
|
||||
# properly; fall back to an English path
|
||||
return os.path.expanduser("~/Documents/Anki")
|
||||
else:
|
||||
return os.path.join(loc, "Anki")
|
||||
|
||||
def _loadMeta(self):
|
||||
path = os.path.join(self.base, "prefs.db")
|
||||
|
|
|
|||
Loading…
Reference in a new issue