diff --git a/docs/refguide.xml b/docs/refguide.xml
index ba7c27c13..58343e815 100644
--- a/docs/refguide.xml
+++ b/docs/refguide.xml
@@ -2240,18 +2240,21 @@ eligible to run. The all argument should be used with cautio
File and directory names may be relative or absolute. Absolute names are
-used directly. Relative paths are looked for in the following places
-until found:
+used directly. Relative paths are looked for in the
+scripts of each of the following places until
+found:
data filesdirectory search orderscripts, location of$NMAPDIRNMAPDIR environment variable~/.nmap (not searched on Windows).nmap directory
+the directory containing the nmap
+executable
+the directory containing the nmap
+executable, followed by ../share/nmapNMAPDATADIRNMAPDATADIR
-the current directory
+the current directory.
-A scripts subdirectory is also tried in each of
-these.
@@ -4064,11 +4067,12 @@ hosts with at least one
environment variable.
Next comes
~/.nmap.nmap directory
- for real and effective UIDs (POSIX systems only) or location of
- the Nmap executable (Win32 only), and then a compiled-in
- location such as /usr/local/share/nmap or /usr/share/nmap
- . As a last resort, Nmap will look in the current
- directory.
+ for real and effective UIDs (POSIX systems only). This is
+ followed by the location of the nmap
+ executable and the same location with
+ ../share/nmap appended. Then a compiled-in
+ location such as /usr/local/share/nmap or /usr/share/nmap.
+
diff --git a/docs/scripting.xml b/docs/scripting.xml
index b94314fff..599f61403 100644
--- a/docs/scripting.xml
+++ b/docs/scripting.xml
@@ -618,18 +618,21 @@ eligible to run. The all argument should be used with cautio
File and directory names may be relative or absolute. Absolute names are
-used directly. Relative paths are looked for in the following places
-until found:
+used directly. Relative paths are looked for in the
+scripts of each of the following places until
+found:
data filesdirectory search orderscripts, location of$NMAPDIRNMAPDIR environment variable~/.nmap (not searched on Windows).nmap directory
-NMAPDATADIRNMAPDATADIR (a value compiled into Nmap)
-the current directory
+the directory containing the nmap
+executable
+the directory containing the nmap
+executable, followed by ../share/nmap
+NMAPDATADIRNMAPDATADIR
+the current directory.
-A scripts subdirectory is also tried in each of
-these.