[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-diffutils] diff and symlinks
From: |
Paul Eggert |
Subject: |
Re: [bug-diffutils] diff and symlinks |
Date: |
Thu, 02 Dec 2010 13:47:44 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 |
On 12/02/10 05:24, Andries E. Brouwer wrote:
> In short: use lstat instead of stat.
Yes, I also like this suggestion and it is definitely on the
List of Things to Do. It should work with "patch", too.
> Another small change I made to my copy of diff is that two regular
> files with a length of 0 bytes are not compared. Some programs make
> empty files of mode 0 and opening them fails, but the files do not differ.
This has the problem that files like /proc/cpuinfo are mishandled.
For example:
cp /proc/uptime /tmp
diff /proc/uptime /tmp
That's why "diff" reads length-0 files. It used to behave as you
suggest, but we got bug reports.