From a734cd752c2ab1bb0f29694fa03b6699af411d5a Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 28 Aug 2020 15:06:07 +0000 Subject: [PATCH] If fetchfile didn't find the XSL, use a relative path on all platforms. --- NmapOps.cc | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/NmapOps.cc b/NmapOps.cc index ff7aa4f18..341420e08 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -668,15 +668,9 @@ char *NmapOps::XSLStyleSheet() { if (nmap_fetchfile(tmpxsl, sizeof(tmpxsl), "nmap.xsl") == 1) { xsl_stylesheet = filename_to_url(tmpxsl); } else { -#if WIN32 - /* Use a relative URL on Windows if nmap_fetchfile failed. It won't work, + /* Use a relative URL if nmap_fetchfile failed. It won't work, but it gives a clue that there is an nmap.xsl somewhere. */ - Strncpy(tmpxsl, "nmap.xsl", sizeof(tmpxsl)); - xsl_stylesheet = strdup(tmpxsl); -#else - Snprintf(tmpxsl, sizeof(tmpxsl), "%s/nmap.xsl", NMAPDATADIR); - xsl_stylesheet = filename_to_url(tmpxsl); -#endif + xsl_stylesheet = strdup("nmap.xsl"); } return xsl_stylesheet;