File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2121from os .path import basename
2222from datetime import datetime
2323from time import mktime
24- from xml .sax .saxutils import escape
24+ from xml .sax .saxutils import quoteattr
2525
2626from beets .util import displayable_path
2727from beets .dbcore import types
@@ -51,7 +51,7 @@ class Amarok(MetaSource):
5151
5252 queryXML = u'<query version="1.0"> \
5353 <filters> \
54- <and><include field="filename" value="%s" /></and> \
54+ <and><include field="filename" value=%s /></and> \
5555 </filters> \
5656 </query>'
5757
@@ -71,7 +71,9 @@ def sync_from_source(self, item):
7171 # for the patch relative to the mount point. But the full path is part
7272 # of the result set. So query for the filename and then try to match
7373 # the correct item from the results we get back
74- results = self .collection .Query (self .queryXML % escape (basename (path )))
74+ results = self .collection .Query (
75+ self .queryXML % quoteattr (basename (path ))
76+ )
7577 for result in results :
7678 if result ['xesam:url' ] != path :
7779 continue
Original file line number Diff line number Diff line change 3030 :bug: `2583 `
3131* :doc: `/plugins/web `: Fix a crash on Windows under Python 2 when serving
3232 non-ASCII filenames. Thanks to :user: `robot3498712 `. :bug: `2592 ` :bug: `2593 `
33+ * :doc: `/plugins/metasync `: Fix a crash in the Amarok backend when filenames
34+ contain quotes. Thanks to :user: `aranc23 `. :bug: `2595 ` :bug: `2596 `
3335
3436
35371.4.4 (June 10, 2017)
You can’t perform that action at this time.
0 commit comments