aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/em-unix.el22
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.")
342 (eq system-type 'ms-dos)) 342 (eq system-type 'ms-dos))
343 (setq attr (eshell-file-attributes (car files))) 343 (setq attr (eshell-file-attributes (car files)))
344 (nth 10 attr-target) (nth 10 attr) 344 (nth 10 attr-target) (nth 10 attr)
345 ;; Use equal, not -, since the inode and the device could
346 ;; cons cells.
345 (equal (nth 10 attr-target) (nth 10 attr)) 347 (equal (nth 10 attr-target) (nth 10 attr))
346 (nth 11 attr-target) (nth 11 attr) 348 (nth 11 attr-target) (nth 11 attr)
347 (= (nth 11 attr-target) (nth 11 attr))) 349 (equal (nth 11 attr-target) (nth 11 attr)))
348 (eshell-error (format "%s: `%s' and `%s' are the same file\n" 350 (eshell-error (format "%s: `%s' and `%s' are the same file\n"
349 command (car files) target))) 351 command (car files) target)))
350 (t 352 (t
@@ -366,14 +368,16 @@ Remove the DIRECTORY(ies), if they are empty.")
366 (let (eshell-warn-dot-directories) 368 (let (eshell-warn-dot-directories)
367 (if (and (not deep) 369 (if (and (not deep)
368 (eq func 'rename-file) 370 (eq func 'rename-file)
369 (= (nth 11 (eshell-file-attributes 371 ;; Use equal, since the device might be a
370 (file-name-directory 372 ;; cons cell.
371 (directory-file-name 373 (equal (nth 11 (eshell-file-attributes
372 (expand-file-name source))))) 374 (file-name-directory
373 (nth 11 (eshell-file-attributes 375 (directory-file-name
374 (file-name-directory 376 (expand-file-name source)))))
375 (directory-file-name 377 (nth 11 (eshell-file-attributes
376 (expand-file-name target))))))) 378 (file-name-directory
379 (directory-file-name
380 (expand-file-name target)))))))
377 (apply 'eshell-funcalln func source target args) 381 (apply 'eshell-funcalln func source target args)
378 (unless (file-directory-p target) 382 (unless (file-directory-p target)
379 (if verbose 383 (if verbose