aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-02-19 10:59:45 +0000
committerRon Yorston <rmy@pobox.com>2019-02-19 10:59:45 +0000
commit8c47a98c9166ff23c3bcbb3e1ef8430b349cf71e (patch)
treeaebfe98490659a3882dc2d391a15ea2d95c7e8b4 /editors
parent4d47580175918882dd827183569d6a50f460f00a (diff)
downloadbusybox-w32-8c47a98c9166ff23c3bcbb3e1ef8430b349cf71e.tar.gz
busybox-w32-8c47a98c9166ff23c3bcbb3e1ef8430b349cf71e.tar.bz2
busybox-w32-8c47a98c9166ff23c3bcbb3e1ef8430b349cf71e.zip
win32: stat(2) succeeds if fetching extra metadata fails
Some files can't be opened to fetch additional metadata. When that happens allow stat(2) to successfully return what data it has. In a few cases where the inode number is used to determine if files are identical ignore invalid inode numbers.
Diffstat (limited to 'editors')
-rw-r--r--editors/diff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/diff.c b/editors/diff.c
index 815c8a915..308d9782b 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -1040,7 +1040,9 @@ int diff_main(int argc UNUSED_PARAM, char **argv)
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
1043 && (!ENABLE_PLATFORM_MINGW32 || ENABLE_FEATURE_EXTRA_FILE_DATA) 1043 && (ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA)
1044 /* ignore invalid inode numbers */
1045 && (ENABLE_FEATURE_EXTRA_FILE_DATA && stb[0].st_ino != 0)
1044 && stb[0].st_ino == stb[1].st_ino 1046 && stb[0].st_ino == stb[1].st_ino
1045 && stb[0].st_dev == stb[1].st_dev 1047 && stb[0].st_dev == stb[1].st_dev
1046 && stb[0].st_size == stb[1].st_size 1048 && stb[0].st_size == stb[1].st_size