diff lisp/files.el @ 53477:79093b308520

* progmodes/idlwave.el (idlwave-make-tags): * textmodes/flyspell.el (flyspell-large-region):. * progmodes/make-mode.el (makefile-query-by-make-minus-q): * emulation/viper-util.el (viper-glob-unix-files): * emacs-lisp/shadow.el (shadow-same-file-or-nonexistent): * man.el (Man-init-defvars): * jka-compr.el (jka-compr-call-process): * files.el (get-free-disk-space,insert-directory): * ediff-ptch.el (ediff-test-patch-utility): * ediff-diff.el (ediff-test-utility): * dired-aux.el (dired-check-process): * mail/sendmail.el (sendmail-send-it): Don't use = or zerop to test the return value of call-process, because it can be a string.
author Eli Zaretskii <eliz@is.elta.co.il>
date Sat, 03 Jan 2004 12:11:21 +0000
parents 9bdc3d1a6a5f
children 8995f4286209
line wrap: on
line diff
--- a/lisp/files.el	Fri Jan 02 22:17:42 2004 +0000
+++ b/lisp/files.el	Sat Jan 03 12:11:21 2004 +0000
@@ -4137,10 +4137,10 @@
     (save-match-data
       (with-temp-buffer
 	(when (and directory-free-space-program
-		   (zerop (call-process directory-free-space-program
-					nil t nil
-					directory-free-space-args
-					dir)))
+		   (eq 0 (call-process directory-free-space-program
+				       nil t nil
+				       directory-free-space-args
+				       dir)))
 	  ;; Usual format is a header line followed by a line of
 	  ;; numbers.
 	  (goto-char (point-min))
@@ -4260,21 +4260,21 @@
 				 file))))))))
 
 	  ;; If `insert-directory-program' failed, signal an error.
-	  (if (/= result 0)
-	      ;; On non-Posix systems, we cannot open a directory, so
-	      ;; don't even try, because that will always result in
-	      ;; the ubiquitous "Access denied".  Instead, show the
-	      ;; command line so the user can try to guess what went wrong.
-	      (if (and (file-directory-p file)
-		       (memq system-type '(ms-dos windows-nt)))
-		  (error
-		   "Reading directory: \"%s %s -- %s\" exited with status %s"
-		   insert-directory-program
-		   (if (listp switches) (concat switches) switches)
-		   file result)
-		;; Unix.  Access the file to get a suitable error.
-		(access-file file "Reading directory")
-		(error "Listing directory failed but `access-file' worked")))
+	  (unless (eq 0 result)
+	    ;; On non-Posix systems, we cannot open a directory, so
+	    ;; don't even try, because that will always result in
+	    ;; the ubiquitous "Access denied".  Instead, show the
+	    ;; command line so the user can try to guess what went wrong.
+	    (if (and (file-directory-p file)
+		     (memq system-type '(ms-dos windows-nt)))
+		(error
+		 "Reading directory: \"%s %s -- %s\" exited with status %s"
+		 insert-directory-program
+		 (if (listp switches) (concat switches) switches)
+		 file result)
+	      ;; Unix.  Access the file to get a suitable error.
+	      (access-file file "Reading directory")
+	      (error "Listing directory failed but `access-file' worked")))
 
 	  (when (string-match "--dired\\>" switches)
 	    (forward-line -2)