fake out support for POSIX -H and -L options since busybox cp dereferences everything by default

This commit is contained in:
Mike Frysinger
2005-04-14 02:52:50 +00:00
parent 75ac42b1ae
commit 2ed05ab146
3 changed files with 19 additions and 9 deletions

View File

@ -54,10 +54,11 @@ int copy_file(const char *source, const char *dest, int flags)
}
} else {
if (source_stat.st_dev == dest_stat.st_dev &&
source_stat.st_ino == dest_stat.st_ino) {
bb_error_msg("`%s' and `%s' are the same file", source, dest);
return -1;
}
source_stat.st_ino == dest_stat.st_ino)
{
bb_error_msg("`%s' and `%s' are the same file", source, dest);
return -1;
}
dest_exists = 1;
}