summaryrefslogtreecommitdiff
path: root/libbb/copy_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r--libbb/copy_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index a4be875d2..a427c441f 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -100,12 +100,15 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
100 return -1; 100 return -1;
101 } 101 }
102 } else { 102 } else {
103#if !ENABLE_PLATFORM_MINGW32
104 /* MinGW does not have inode, and does not use device */
103 if (source_stat.st_dev == dest_stat.st_dev 105 if (source_stat.st_dev == dest_stat.st_dev
104 && source_stat.st_ino == dest_stat.st_ino 106 && source_stat.st_ino == dest_stat.st_ino
105 ) { 107 ) {
106 bb_error_msg("'%s' and '%s' are the same file", source, dest); 108 bb_error_msg("'%s' and '%s' are the same file", source, dest);
107 return -1; 109 return -1;
108 } 110 }
111#endif
109 dest_exists = 1; 112 dest_exists = 1;
110 } 113 }
111 114