mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Insert a path separator in returned paths in init_scandir when WIN32 is defined in nse_init.cc. The Windows code was inserting a separator to find files (e.g. globbing on "%s\*") but was not inserting the separator in returned paths. A symptom of this was scanning with --script=scripts and seeing error messages about not being able to access things like "C:\Nmap\scriptsanonFTP.nse" (should be "C:\Nmap\scripts\anonFTP.nse").
This commit is contained in:
parent
b0d224e0da
commit
82abfd3e1b
1 changed files with 1 additions and 1 deletions
|
|
@ -632,7 +632,7 @@ int init_scandir(char* dirname, std::vector<std::string>& result, int files_or_d
|
|||
|
||||
// otherwise we add it to the results
|
||||
// we assume that dirname ends with a directory separator of some kind
|
||||
path = std::string(dirname) + std::string(entry.cFileName);
|
||||
path = std::string(dirname) + "\\" + std::string(entry.cFileName);
|
||||
result.push_back(path);
|
||||
morefiles = FindNextFile(dir, &entry);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue