update: properly skip symlinks in path that is to be updated.

This commit is contained in:
Anton Khirnov
2012-04-04 08:56:45 +02:00
committed by Max Kellermann
parent 8ff0197a43
commit 83174de420
2 changed files with 6 additions and 1 deletions

View File

@@ -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);