Subject: bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy

From: Thierry Volpiatto <[email-masked]>
Date: Sun, 15 Jan 2012 06:59:44 +0100

Stefan Monnier <[email-masked]> writes:

>
> IIUC the original problem in dired-do-copy
In dired-create-files.

> needs to test "same file" rather than "same name", so it should not
> use file-name-equal-p but file-equal-p (which would rely on
> file-attributes, presumably).

How do you compare two files with file-attributes?
Locally, equal is ok, but when using /sudo::.. the gid-change, inode
and device-num are differents:

/home/thierry/Test:

--8<---------------cut here---------------start------------->8---
(:type t :links 2 :uid "thierry" :gid "thierry" :access-time
       (20241 21214)
       :modif-time
       (20241 20731)
       :status
       (20241 20731)
       :size 4096 :mode "drwxrwxr-x" :gid-change nil 
       :inode 4598437 :device-num 2049)
--8<---------------cut here---------------end--------------->8---

/sudo::/home/thierry/Test

--8<---------------cut here---------------start------------->8---
(:type t :links 2 :uid "thierry" :gid "thierry" :access-time
       (20241 21214)
       :modif-time
       (20241 20731)
       :status
       (20241 20731)
       :size 4096 :mode "drwxrwxr-x" :gid-change t 
       :inode (70 . 10917)
       :device-num (-1 . 0))
--8<---------------cut here---------------end--------------->8---

On info we have:
`(5888 2 . 43978)'
      has an inode number of 6473924464520138.

`(15479 . 46724)'
      is on the file-system device whose number is 1014478468.

How do you get such results?

Thanks.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997