changeset 39293:1e91a5f60ae6

(eshell-shuffle-files, eshell-shuffle-files): Use `equal', not `=', since the device number can be a cons cell.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 14 Sep 2001 16:45:57 +0000
parents 1fa1a0656384
children e1f4b9b93c45
files lisp/eshell/em-unix.el
diffstat 1 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/eshell/em-unix.el	Fri Sep 14 11:21:16 2001 +0000
+++ b/lisp/eshell/em-unix.el	Fri Sep 14 16:45:57 2001 +0000
@@ -342,9 +342,11 @@
 		 (eq system-type 'ms-dos))
 	     (setq attr (eshell-file-attributes (car files)))
 	     (nth 10 attr-target) (nth 10 attr)
+	     ;; Use equal, not -, since the inode and the device could
+	     ;; cons cells.
 	     (equal (nth 10 attr-target) (nth 10 attr))
 	     (nth 11 attr-target) (nth 11 attr)
-	     (= (nth 11 attr-target) (nth 11 attr)))
+	     (equal (nth 11 attr-target) (nth 11 attr)))
 	(eshell-error (format "%s: `%s' and `%s' are the same file\n"
 			      command (car files) target)))
        (t
@@ -366,14 +368,16 @@
 		(let (eshell-warn-dot-directories)
 		  (if (and (not deep)
 			   (eq func 'rename-file)
-			   (= (nth 11 (eshell-file-attributes
-				       (file-name-directory
-					(directory-file-name
-					 (expand-file-name source)))))
-			      (nth 11 (eshell-file-attributes
-				       (file-name-directory
-					(directory-file-name
-					 (expand-file-name target)))))))
+			   ;; Use equal, since the device might be a
+			   ;; cons cell.
+			   (equal (nth 11 (eshell-file-attributes
+					   (file-name-directory
+					    (directory-file-name
+					     (expand-file-name source)))))
+				  (nth 11 (eshell-file-attributes
+					   (file-name-directory
+					    (directory-file-name
+					     (expand-file-name target)))))))
 		      (apply 'eshell-funcalln func source target args)
 		  (unless (file-directory-p target)
 		    (if verbose