From 83174de420eb2a63d77a7953081b3fb360ecbc31 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 4 Apr 2012 08:56:45 +0200 Subject: update: properly skip symlinks in path that is to be updated. --- NEWS | 1 + src/update_walk.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ddb612c3b..a87022039 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ ver 0.16.8 (2012/??/??) * output: - osx: fix stuttering due to buffering bug * fix endless loop in text file reader +* update: skip symlinks in path that is to be updated ver 0.16.7 (2012/02/04) diff --git a/src/update_walk.c b/src/update_walk.c index 03fa78456..5d2f778ff 100644 --- a/src/update_walk.c +++ b/src/update_walk.c @@ -848,6 +848,9 @@ directory_make_child_checked(struct directory *parent, const char *path) return NULL; } + if (skip_symlink(parent, path)) + return NULL; + /* if we're adding directory paths, make sure to delete filenames with potentially the same name */ conflicting = songvec_find(&parent->songs, base); @@ -896,7 +899,8 @@ updatePath(const char *path) name = g_path_get_basename(path); - if (stat_directory_child(parent, name, &st) == 0) + if (!skip_symlink(parent, name) && + stat_directory_child(parent, name, &st) == 0) updateInDirectory(parent, name, &st); else delete_name_in(parent, name); -- cgit v1.2.3