"Basil L. Contovounesios" <[email protected]> writes: Hi Basil,
>> Maybe one could argue that the inode number shall equal >> for both files, but the device numbers must differ. > > Hmm, for me on GNU/Linux the device numbers are indeed > different but the inode number is always the same: > > (equal (file-attribute-inode-number > (file-attributes "/etc/pam.conf")) > (file-attribute-inode-number > (file-attributes "/sudo::/etc/pam.conf"))) > ⇒ t > > (equal (file-attribute-device-number > (file-attributes "/etc/pam.conf")) > (file-attribute-device-number > (file-attributes "/sudo::/etc/pam.conf"))) > ⇒ nil > > Is there anything unusual about this? That's as expected. However, on remote hosts which do not tell us inode numbers, Tramp generates virtual ones. Think about "smb", for example. > By "comparing" e.g. "/etc/pam.conf" and > "/sudo::/etc/pam.conf" I mean determining whether they > ultimately name the same file, as per file-equal-p. Tramp has no information about how different methods and hosts are related. Even "/ssh::.emacs" and "/scp::.emacs" live on different filesystems for Tramp. One could implement such a relation for local files and remote files on the local host, using Tramp's `tramp-local-host-p' function. This would require an extension to Tramp's implementation of `file-equal-p'. Hmm, I'm kind of undecided whether it's worth to do. > Kind regards, Best regards, Michael. _______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
