mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
* libbb/copy_file.c (copy_file): Check st_dev instead of st_rdev.
This commit is contained in:
parent
360060252a
commit
9ef2ea27d4
@ -55,7 +55,7 @@ int copy_file(const char *source, const char *dest, int flags)
|
|||||||
dest_exists = 0;
|
dest_exists = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dest_exists && source_stat.st_rdev == dest_stat.st_rdev &&
|
if (dest_exists && source_stat.st_dev == dest_stat.st_dev &&
|
||||||
source_stat.st_ino == dest_stat.st_ino) {
|
source_stat.st_ino == dest_stat.st_ino) {
|
||||||
error_msg("`%s' and `%s' are the same file", source, dest);
|
error_msg("`%s' and `%s' are the same file", source, dest);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user