changeset 6192:b7fa2446073e

(ange-ftp-nslookup-host, ange-ftp-start-process): Bind default-directory to some accessible directory, if necessary.
author Richard M. Stallman <rms@gnu.org>
date Fri, 04 Mar 1994 01:33:43 +0000
parents 84fc456177e2
children 74fcc9007c39
files lisp/ange-ftp.el
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ange-ftp.el	Fri Mar 04 01:08:34 1994 +0000
+++ b/lisp/ange-ftp.el	Fri Mar 04 01:33:43 1994 +0000
@@ -857,7 +857,7 @@
 ;;;; Internal variables.
 ;;;; ------------------------------------------------------------
 
-(defconst ange-ftp-version "$Revision: 1.41 $")
+(defconst ange-ftp-version "$Revision: 1.42 $")
 
 (defvar ange-ftp-data-buffer-name " *ftp data*"
   "Buffer name to hold directory listing data received from ftp process.")
@@ -1726,7 +1726,11 @@
   "Attempt to resolve the given HOSTNAME using nslookup if possible."
   (interactive "sHost:  ")
   (if ange-ftp-nslookup-program
-      (let ((proc (start-process " *nslookup*" " *nslookup*"
+      (let ((default-directory
+	      (if (file-accessible-directory-p default-directory)
+		  default-directory
+		exec-directory))
+	    (proc (start-process " *nslookup*" " *nslookup*"
 				 ange-ftp-nslookup-program host))
 	    (res host))
 	(process-kill-without-query proc)
@@ -1751,6 +1755,10 @@
 		       ange-ftp-gateway-ftp-program-name
 		     ange-ftp-ftp-program-name))
 	 (args (append (list ftp-prog) ange-ftp-ftp-program-args))
+	 (default-directory
+	   (if (file-accessible-directory-p default-directory)
+	       default-directory
+	     exec-directory))
 	 proc)
     (if use-gateway
 	(if ange-ftp-gateway-program-interactive