diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/copy_file.c | 5 | ||||
-rw-r--r-- | libbb/recursive_action.c | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c index 48aaf481d..be65c4b47 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c | |||
@@ -85,12 +85,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) | |||
85 | /* Inverse of cp -d ("cp without -d") */ | 85 | /* Inverse of cp -d ("cp without -d") */ |
86 | #define FLAGS_DEREF (flags & (FILEUTILS_DEREFERENCE + FILEUTILS_DEREFERENCE_L0)) | 86 | #define FLAGS_DEREF (flags & (FILEUTILS_DEREFERENCE + FILEUTILS_DEREFERENCE_L0)) |
87 | 87 | ||
88 | #if ENABLE_PLATFORM_MINGW32 | ||
89 | /* stat can't be aliased, and MinGW uses lstat anyway */ | ||
90 | if (lstat(source, &source_stat) < 0) { | ||
91 | #else | ||
92 | if ((FLAGS_DEREF ? stat : lstat)(source, &source_stat) < 0) { | 88 | if ((FLAGS_DEREF ? stat : lstat)(source, &source_stat) < 0) { |
93 | #endif | ||
94 | /* This may be a dangling symlink. | 89 | /* This may be a dangling symlink. |
95 | * Making [sym]links to dangling symlinks works, so... */ | 90 | * Making [sym]links to dangling symlinks works, so... */ |
96 | if (flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) | 91 | if (flags & (FILEUTILS_MAKE_SOFTLINK|FILEUTILS_MAKE_HARDLINK)) |
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index 560c93cad..b5cf7c0ab 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
@@ -73,12 +73,7 @@ int FAST_FUNC recursive_action(const char *fileName, | |||
73 | if (depth == 0) | 73 | if (depth == 0) |
74 | follow = ACTION_FOLLOWLINKS | ACTION_FOLLOWLINKS_L0; | 74 | follow = ACTION_FOLLOWLINKS | ACTION_FOLLOWLINKS_L0; |
75 | follow &= flags; | 75 | follow &= flags; |
76 | #if ENABLE_PLATFORM_MINGW32 | ||
77 | /* stat can't be aliased, and MinGW uses lstat anyway */ | ||
78 | status = lstat(fileName, &statbuf); | ||
79 | #else | ||
80 | status = (follow ? stat : lstat)(fileName, &statbuf); | 76 | status = (follow ? stat : lstat)(fileName, &statbuf); |
81 | #endif | ||
82 | if (status < 0) { | 77 | if (status < 0) { |
83 | #ifdef DEBUG_RECURS_ACTION | 78 | #ifdef DEBUG_RECURS_ACTION |
84 | bb_error_msg("status=%d flags=%x", status, flags); | 79 | bb_error_msg("status=%d flags=%x", status, flags); |