mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 08:07:11 -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)
|
txt = self.mungeHTML(txt)
|
||||||
# misbehaving apps may include a null byte in the text
|
# misbehaving apps may include a null byte in the text
|
||||||
txt = txt.replace("\x00", "")
|
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
|
self.note.fields[self.currentField] = txt
|
||||||
if not self.addMode:
|
if not self.addMode:
|
||||||
self.note.flush()
|
self.note.flush()
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,13 @@ and no other programs are accessing your profile folders, then try again."""))
|
||||||
return p
|
return p
|
||||||
else:
|
else:
|
||||||
loc = QDesktopServices.storageLocation(QDesktopServices.DocumentsLocation)
|
loc = QDesktopServices.storageLocation(QDesktopServices.DocumentsLocation)
|
||||||
|
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")
|
return os.path.join(loc, "Anki")
|
||||||
|
|
||||||
def _loadMeta(self):
|
def _loadMeta(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue