comparison lisp/eshell/em-unix.el @ 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 f3a553d88ab7
children 3a906538d254
comparison
equal deleted inserted replaced
39292:1fa1a0656384 39293:1e91a5f60ae6
340 ((and attr-target 340 ((and attr-target
341 (or (not (eshell-under-windows-p)) 341 (or (not (eshell-under-windows-p))
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
351 (let ((source (car files)) 353 (let ((source (car files))
352 (target (if is-dir 354 (target (if is-dir
364 (eshell-error (format "%s: %s: omitting directory\n" 366 (eshell-error (format "%s: %s: omitting directory\n"
365 command (car files))) 367 command (car files)))
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
380 (eshell-printn 384 (eshell-printn
381 (format "%s: making directory %s" 385 (format "%s: making directory %s"