mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Renamed nmap_fileexistsandisreadable() by file_is_readable(). Former was
hardly readable and is not even a good candidate for longest method name (http://msdn.microsoft.com/en-us/library/system.windows.media.textformatting.textsource.gettexteffectcharacterindexfromtextsourcecharacterindex.aspx#Y0)
This commit is contained in:
@@ -305,7 +305,7 @@ static int nse_fetchfile_absolute(char *path, size_t path_len, const char *file)
|
||||
if (o.debugging > 1)
|
||||
log_write(LOG_STDOUT, "%s: Trying absolute path %s\n", SCRIPT_ENGINE, file);
|
||||
Strncpy(path, file, path_len);
|
||||
return nmap_fileexistsandisreadable(file);
|
||||
return file_is_readable(file);
|
||||
}
|
||||
|
||||
return nmap_fetchfile(path, path_len, file);
|
||||
@@ -324,7 +324,7 @@ static int nse_fetchscript(char *path, size_t path_len, const char *file) {
|
||||
if (o.debugging > 1)
|
||||
log_write(LOG_STDOUT, "%s: Trying absolute path %s\n", SCRIPT_ENGINE, file);
|
||||
Strncpy(path, file, path_len);
|
||||
return nmap_fileexistsandisreadable(file);
|
||||
return file_is_readable(file);
|
||||
}
|
||||
|
||||
// lets look in <path>/scripts
|
||||
@@ -333,7 +333,7 @@ static int nse_fetchscript(char *path, size_t path_len, const char *file) {
|
||||
if (type == 0) {
|
||||
// current directory
|
||||
Strncpy(path, file, path_len);
|
||||
return nmap_fileexistsandisreadable(file);
|
||||
return file_is_readable(file);
|
||||
}
|
||||
|
||||
return type;
|
||||
|
||||
Reference in New Issue
Block a user