From: Tim Kientzle Date: Mon, 27 Jul 2009 04:20:10 +0000 (-0400) Subject: Disable symlink checks on Windows for now. X-Git-Tag: v2.8.0~490 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aec49ce700c908832fe4d194267d7ee85e76994;p=thirdparty%2Flibarchive.git Disable symlink checks on Windows for now. SVN-Revision: 1293 --- diff --git a/tar/test/main.c b/tar/test/main.c index 8a0342af5..a061fcd19 100644 --- a/tar/test/main.c +++ b/tar/test/main.c @@ -942,6 +942,16 @@ int test_assert_is_link(const char *file, int line, const char *pathname, const char *contents) { +#if defined(_WIN32) && !defined(__CYGWIN__) + // TODO: Vista supports symlinks + ++failures; + if (!previous_failures(file, line, 1)) { + fprintf(stderr, "%s:%d: Symlink ``%s'' not supported\n", + file, line, pathname); + report_failure(NULL); + } + return (0); +#else char buff[300]; struct stat st; ssize_t linklen; @@ -992,6 +1002,7 @@ test_assert_is_link(const char *file, int line, return (0); } return (1); +#endif } int @@ -1084,11 +1095,12 @@ test_assert_make_symlink(const char *file, int line, { int succeeded; - count_assertion(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) int targetIsDir = 0; /* TODO: Fix this. */ + count_assertion(file, line); succeeded = CreateSymbolicLink(newpath, linkto, targetIsDir); #else + count_assertion(file, line); succeeded = !symlink(linkto, newpath); #endif if (succeeded) {