aboutsummaryrefslogtreecommitdiffstats
path: root/src/update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-03 13:19:58 +0100
committerMax Kellermann <max@duempel.org>2009-01-03 13:19:58 +0100
commita8dbd8f44f4106f054b49edc5994d9d8b4a5b9a9 (patch)
tree0ef3ac83ca237d7967f1ea6509913e446ba9fbb2 /src/update.c
parent48aace185958f9a6363a8ac389924fcf73acb8a7 (diff)
downloadmpd-a8dbd8f44f4106f054b49edc5994d9d8b4a5b9a9.tar.gz
mpd-a8dbd8f44f4106f054b49edc5994d9d8b4a5b9a9.tar.xz
mpd-a8dbd8f44f4106f054b49edc5994d9d8b4a5b9a9.zip
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.
Diffstat (limited to '')
-rw-r--r--src/update.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/update.c b/src/update.c
index e313f0aef..853aa9d8d 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);