From 29109de6379e82357fb5b47d18b217224540bb33 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 14 Dec 2007 08:33:31 +0000 Subject: [PATCH] Consider Windows paths starting with \ absolute when used with the --script option. --- CHANGELOG | 3 +++ nse_init.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 416ae0ede..506cf69bd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ # Nmap Changelog ($Id$); -*-text-*- +o On Windows, paths beginning with \ are now considered absolute when + used with the --script option. + o Zenmap no longer double-spaces its output (by inadvertently duplicating newlines) when viewing scan results that were saved to a file. diff --git a/nse_init.cc b/nse_init.cc index 54029f7d8..d92d06757 100644 --- a/nse_init.cc +++ b/nse_init.cc @@ -528,7 +528,7 @@ static bool filename_is_absolute(const char *file) { if (file[0] == '/') return true; #ifdef WIN32 - if (file[0] != '\0' && file[1] == ':') + if ((file[0] != '\0' && file[1] == ':') || file[0] == '\\') return true; #endif return false;