aboutsummaryrefslogtreecommitdiff
path: root/libbb/copy_file.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-11-30 09:50:05 +0000
committerRon Yorston <rmy@pobox.com>2014-11-30 09:50:05 +0000
commit7ef60bda00dc4b2fbccf67a40885569ab45eb7aa (patch)
tree3cc5422bcf037f0e14b46ebc395d4cd67bcae4de /libbb/copy_file.c
parent084cca42dfa926e6fbf8a95b9adc1831647d3528 (diff)
downloadbusybox-w32-7ef60bda00dc4b2fbccf67a40885569ab45eb7aa.tar.gz
busybox-w32-7ef60bda00dc4b2fbccf67a40885569ab45eb7aa.tar.bz2
busybox-w32-7ef60bda00dc4b2fbccf67a40885569ab45eb7aa.zip
Don't store file details in inode hash table
Diffstat (limited to 'libbb/copy_file.c')
-rw-r--r--libbb/copy_file.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index 935a9a4c4..a427c441f 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -142,7 +142,6 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
142 } 142 }
143 143
144 /* Did we ever create source ourself before? */ 144 /* Did we ever create source ourself before? */
145#if !ENABLE_PLATFORM_MINGW32
146 tp = is_in_ino_dev_hashtable(&source_stat); 145 tp = is_in_ino_dev_hashtable(&source_stat);
147 if (tp) { 146 if (tp) {
148 /* We did! it's a recursion! man the lifeboats... */ 147 /* We did! it's a recursion! man the lifeboats... */
@@ -150,7 +149,6 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
150 source); 149 source);
151 return -1; 150 return -1;
152 } 151 }
153#endif
154 152
155 if (dest_exists) { 153 if (dest_exists) {
156 if (!S_ISDIR(dest_stat.st_mode)) { 154 if (!S_ISDIR(dest_stat.st_mode)) {
@@ -181,11 +179,9 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
181 return -1; 179 return -1;
182 } 180 }
183 } 181 }
184#if !ENABLE_PLATFORM_MINGW32
185 /* remember (dev,inode) of each created dir. 182 /* remember (dev,inode) of each created dir.
186 * NULL: name is not remembered */ 183 * NULL: name is not remembered */
187 add_to_ino_dev_hashtable(&dest_stat, NULL); 184 add_to_ino_dev_hashtable(&dest_stat, NULL);
188#endif
189 185
190 /* Recursively copy files in SOURCE */ 186 /* Recursively copy files in SOURCE */
191 dp = opendir(source); 187 dp = opendir(source);
@@ -255,7 +251,6 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
255 goto dont_cat; 251 goto dont_cat;
256 } 252 }
257 253
258#if !ENABLE_PLATFORM_MINGW32
259 if (ENABLE_FEATURE_PRESERVE_HARDLINKS && !FLAGS_DEREF) { 254 if (ENABLE_FEATURE_PRESERVE_HARDLINKS && !FLAGS_DEREF) {
260 const char *link_target; 255 const char *link_target;
261 link_target = is_in_ino_dev_hashtable(&source_stat); 256 link_target = is_in_ino_dev_hashtable(&source_stat);
@@ -273,7 +268,6 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags)
273 } 268 }
274 add_to_ino_dev_hashtable(&source_stat, dest); 269 add_to_ino_dev_hashtable(&source_stat, dest);
275 } 270 }
276#endif
277 271
278 src_fd = open_or_warn(source, O_RDONLY); 272 src_fd = open_or_warn(source, O_RDONLY);
279 if (src_fd < 0) 273 if (src_fd < 0)