From a8dbd8f44f4106f054b49edc5994d9d8b4a5b9a9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Jan 2009 13:19:58 +0100 Subject: update: don't check for symlinks on WIN32 WIN32 does have some kind of symbolic links (e.g. in NTFS), but the readlink() function is not available. Disable symlink checking for now. --- src/update.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/update.c b/src/update.c index e313f0ae..853aa9d8 100644 --- a/src/update.c +++ b/src/update.c @@ -68,6 +68,8 @@ static struct song *delete; static struct condition delete_cond; +#ifndef WIN32 + enum { DEFAULT_FOLLOW_INSIDE_SYMLINKS = true, DEFAULT_FOLLOW_OUTSIDE_SYMLINKS = true, @@ -76,6 +78,8 @@ enum { static bool follow_inside_symlinks; static bool follow_outside_symlinks; +#endif + unsigned isUpdatingDB(void) { @@ -427,6 +431,7 @@ static bool skip_path(const char *path) static bool skip_symlink(const struct directory *directory, const char *utf8_name) { +#ifndef WIN32 char buffer[MPD_PATH_MAX]; char *path_fs; const char *p; @@ -476,6 +481,14 @@ skip_symlink(const struct directory *directory, const char *utf8_name) to a song which is already in the database - skip according to the follow_inside_symlinks param*/ return !follow_inside_symlinks; +#else + /* no symlink checking on WIN32 */ + + (void)directory; + (void)utf8_name; + + return false; +#endif } static bool @@ -697,6 +710,7 @@ static void reap_update_task(void) void update_global_init(void) { +#ifndef WIN32 follow_inside_symlinks = config_get_bool(CONF_FOLLOW_INSIDE_SYMLINKS, DEFAULT_FOLLOW_INSIDE_SYMLINKS); @@ -704,6 +718,7 @@ void update_global_init(void) follow_outside_symlinks = config_get_bool(CONF_FOLLOW_OUTSIDE_SYMLINKS, DEFAULT_FOLLOW_OUTSIDE_SYMLINKS); +#endif cond_init(&delete_cond); -- cgit v1.2.3