aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-10-05 01:35:10 +0000
committerMatt Kraai <kraai@debian.org>2001-10-05 01:35:10 +0000
commit4c557bf576e772bfd78429d5f9b2a436ccadf268 (patch)
treeaa5f6352063fadb09d09d303436cdf3f0f6b79a4 /libbb
parent54a992d81e4a875e1710e188a3593fa9762e06a4 (diff)
downloadbusybox-4c557bf576e772bfd78429d5f9b2a436ccadf268.tar.gz
Invert FILEUTILS_PRESERVE_SYMLINKS into FILEUTILS_DEREFERENCE.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/copy_file.c4
-rw-r--r--libbb/libbb.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 9c1bba689..d3902ffbe 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -40,9 +40,9 @@ int copy_file(const char *source, const char *dest, int flags)
int dest_exists = 1;
int status = 0;
- if (((flags & FILEUTILS_PRESERVE_SYMLINKS) &&
+ if ((!(flags & FILEUTILS_DEREFERENCE) &&
lstat(source, &source_stat) < 0) ||
- (!(flags & FILEUTILS_PRESERVE_SYMLINKS) &&
+ ((flags & FILEUTILS_DEREFERENCE) &&
stat(source, &source_stat) < 0)) {
perror_msg("%s", source);
return -1;
diff --git a/libbb/libbb.h b/libbb/libbb.h
index 30f0bb9a7..bbdbc6c86 100644
--- a/libbb/libbb.h
+++ b/libbb/libbb.h
@@ -273,7 +273,7 @@ char *simplify_path(const char *path);
enum {
FILEUTILS_PRESERVE_STATUS = 1,
- FILEUTILS_PRESERVE_SYMLINKS = 2,
+ FILEUTILS_DEREFERENCE = 2,
FILEUTILS_RECUR = 4,
FILEUTILS_FORCE = 8,
FILEUTILS_INTERACTIVE = 16