summaryrefslogtreecommitdiff
path: root/src/share/grabbag/file.c
diff options
context:
space:
mode:
authorJosh Coalson <jcoalson@users.sourceforce.net>2006-10-10 15:02:31 +0000
committerJosh Coalson <jcoalson@users.sourceforce.net>2006-10-10 15:02:31 +0000
commit31251b4cfaed95e2f21f4731e9aa16e64fa99efb (patch)
treeadfda8a642dc498283da10e13cdf002a374085d8 /src/share/grabbag/file.c
parenta0c3b8d9c5e1934a414b1f6f1e12dc5b83f07aed (diff)
downloadflac-31251b4cfaed95e2f21f4731e9aa16e64fa99efb.tar.gz
for grabbag__file_are_same() on windows use strcmp() on filenames temporarily since inode checking doesn't work
Diffstat (limited to 'src/share/grabbag/file.c')
-rw-r--r--src/share/grabbag/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c
index 7bdf2aea..23d6f605 100644
--- a/src/share/grabbag/file.c
+++ b/src/share/grabbag/file.c
@@ -111,7 +111,11 @@ FLAC__bool grabbag__file_change_stats(const char *filename, FLAC__bool read_only
FLAC__bool grabbag__file_are_same(const char *f1, const char *f2)
{
struct stat s1, s2;
+#if defined _MSC_VER || defined __MINGW32__
+ return f1 && f2 && 0 == strcmp(s1, s2); /*@@@@@@ need better method than strcmp */
+#else
return f1 && f2 && stat(f1, &s1) == 0 && stat(f2, &s2) == 0 && s1.st_ino == s2.st_ino;
+#endif
}
FLAC__bool grabbag__file_remove_file(const char *filename)