1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-22 06:09:01 +00:00

Fix a crash with non-ascii paths. Fixes #638

This commit is contained in:
dmiller
2017-02-05 05:56:20 +00:00
parent 1c4dc13f27
commit 4a42504cc2

View File

@@ -204,7 +204,7 @@ class ScriptHelpXMLContentHandler (xml.sax.handler.ContentHandler):
if u"path" not in attrs:
raise ValueError(
u'"directory" element did not have "path" attribute')
path = attrs[u"path"]
path = attrs[u"path"].encode("raw_unicode_escape").decode(sys.getfilesystemencoding())
if dirname == u"scripts":
self.scripts_dir = path
elif dirname == u"nselib":