diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-09-14 16:45:57 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-09-14 16:45:57 +0000 |
commit | c3ea2deb1f408043179d240f164b505f2a20d042 (patch) | |
tree | 9f7b718fbd3577d2c2b48e1320b852c6951aa803 /lisp/eshell/em-unix.el | |
parent | 551629f9129cacf290fb611f7c24306356ff0542 (diff) | |
download | emacs-c3ea2deb1f408043179d240f164b505f2a20d042.tar.gz emacs-c3ea2deb1f408043179d240f164b505f2a20d042.tar.bz2 emacs-c3ea2deb1f408043179d240f164b505f2a20d042.zip |
(eshell-shuffle-files, eshell-shuffle-files):
Use `equal', not `=', since the device number can be a cons cell.
Diffstat (limited to 'lisp/eshell/em-unix.el')
-rw-r--r-- | lisp/eshell/em-unix.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 985191080a1..c568a4286f4 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -342,9 +342,11 @@ Remove the DIRECTORY(ies), if they are empty.") (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 @@ Remove the DIRECTORY(ies), if they are empty.") (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 |