[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] bug#25814: bug#25814: Windows same_file macro is not rel
From: |
Eric Blake |
Subject: |
[bug-diffutils] bug#25814: bug#25814: Windows same_file macro is not reliable |
Date: |
Mon, 20 Feb 2017 10:53:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 02/20/2017 10:01 AM, Kees Dekker wrote:
> Hi,
>
> On file systems that do not support inodes (e.g. NTFS,
NTFS supports inodes; Cygwin uses them. Just because Window's native
stat() is broken does not mean NTFS is broken.
> because not everything is POSIX), the same_file() macro (in system.h) is
> incorrect as st_ino (and probably st_dev) are meaningless.
Rather, instead of ignoring inode, it would be nicer (but indeed a more
complex task) to have gnulib work around window's broken stat() to
provide a version that works instead. It only matters for file systems
that support hard links (like NTFS); on file systems like FAT that lack
hard links, hard-coding that inodes don't work is okay, but on NTFS
where hard-links are supported, treating same_file() as always returning
0 gives wrong results.
At any rate, this is an issue that needs to be resolved in gnulib, as
more than just diffutils is affected by it.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature