diff options
| author | Ron Yorston <rmy@pobox.com> | 2019-01-09 08:23:35 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2019-01-09 08:23:35 +0000 |
| commit | 40d5dd07ea1f290eaed30a03fd598e33a8eaf495 (patch) | |
| tree | 6987142d12edb7d3afa7f6ecafb7292cc7abc239 | |
| parent | 6dc2b8c38716180323903c3266db4a5256739c4f (diff) | |
| download | busybox-w32-40d5dd07ea1f290eaed30a03fd598e33a8eaf495.tar.gz busybox-w32-40d5dd07ea1f290eaed30a03fd598e33a8eaf495.tar.bz2 busybox-w32-40d5dd07ea1f290eaed30a03fd598e33a8eaf495.zip | |
diff: omit unreliable test for same file
diff tries to detect if it's been asked to compare a file with
itself. Because much of the information returned by stat(2) is
fake (in particular, the inode number) this results in false positives.
Simply omit the unreliable test.
| -rw-r--r-- | editors/diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/diff.c b/editors/diff.c index beea3e618..929beb054 100644 --- a/editors/diff.c +++ b/editors/diff.c | |||
| @@ -1039,7 +1039,7 @@ int diff_main(int argc UNUSED_PARAM, char **argv) | |||
| 1039 | * single NFS file system, if a local device number (st_dev) exceeds | 1039 | * single NFS file system, if a local device number (st_dev) exceeds |
| 1040 | * 255, or if a local inode number (st_ino) exceeds 16777215. | 1040 | * 255, or if a local inode number (st_ino) exceeds 16777215. |
| 1041 | */ | 1041 | */ |
| 1042 | if (ENABLE_DESKTOP | 1042 | if (ENABLE_DESKTOP && !ENABLE_PLATFORM_MINGW32 |
| 1043 | && stb[0].st_ino == stb[1].st_ino | 1043 | && stb[0].st_ino == stb[1].st_ino |
| 1044 | && stb[0].st_dev == stb[1].st_dev | 1044 | && stb[0].st_dev == stb[1].st_dev |
| 1045 | && stb[0].st_size == stb[1].st_size | 1045 | && stb[0].st_size == stb[1].st_size |
