From 55aa40a78a6509cbce541c90351b8eb10d1552a1 Mon Sep 17 00:00:00 2001 From: Daniel Klessing Date: Wed, 9 Nov 2011 16:01:09 +0100 Subject: copy_file: kkip inode/device check Inode/Device information is not present under mingw32. Don't rely on it in copy_file.c --- libbb/copy_file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libbb/copy_file.c b/libbb/copy_file.c index d9bbb6ba3..adbc2dea3 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c @@ -147,6 +147,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) } /* Did we ever create source ourself before? */ +#if !ENABLE_PLATFORM_MINGW32 tp = is_in_ino_dev_hashtable(&source_stat); if (tp) { /* We did! it's a recursion! man the lifeboats... */ @@ -154,6 +155,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) source); return -1; } +#endif /* Create DEST */ if (dest_exists) { @@ -184,9 +186,11 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) return -1; } } +#if !ENABLE_PLATFORM_MINGW32 /* remember (dev,inode) of each created dir. * NULL: name is not remembered */ add_to_ino_dev_hashtable(&dest_stat, NULL); +#endif /* Recursively copy files in SOURCE */ dp = opendir(source); @@ -256,6 +260,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) goto dont_cat; } +#if !ENABLE_PLATFORM_MINGW32 if (ENABLE_FEATURE_PRESERVE_HARDLINKS && !FLAGS_DEREF) { const char *link_target; link_target = is_in_ino_dev_hashtable(&source_stat); @@ -273,6 +278,7 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) } add_to_ino_dev_hashtable(&source_stat, dest); } +#endif src_fd = open_or_warn(source, O_RDONLY); if (src_fd < 0) -- cgit v1.2.3-55-g6feb