From cc29c617b0eacb9d6082ef8d68084d6cf84a24a4 Mon Sep 17 00:00:00 2001 From: chme Date: Sat, 18 Mar 2017 09:42:54 +0100 Subject: [PATCH] [filescanner] Switch argument order (input first) --- src/library/filescanner.c | 8 ++++---- src/library/filescanner_playlist.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/library/filescanner.c b/src/library/filescanner.c index 8f0924eb..e86c5023 100644 --- a/src/library/filescanner.c +++ b/src/library/filescanner.c @@ -613,10 +613,10 @@ create_virtual_path(char *path, char *virtual_path, int virtual_path_len) * and resolved_path contains the resolved path (resolved_path must be of length PATH_MAX). * If path is not a symbolic link, resolved_path holds the same value as path. * - * The return value is 0 if the operation is successful, or -1 on failure. In addition + * The return value is 0 if the operation is successful, or -1 on failure */ static int -read_attributes(const char *path, struct stat *sb, char *resolved_path) +read_attributes(char *resolved_path, const char *path, struct stat *sb) { int ret; @@ -723,7 +723,7 @@ process_directory(char *path, int parent_id, int flags) continue; } - ret = read_attributes(entry, &sb, resolved_path); + ret = read_attributes(resolved_path, entry, &sb); if (ret < 0) { DPRINTF(E_LOG, L_SCAN, "Skipping %s, read_attributes() failed\n", entry); @@ -1254,7 +1254,7 @@ process_inotify_file(struct watch_info *wi, char *path, struct inotify_event *ie incomingfiles_buffer[i] = 0; } - ret = read_attributes(path, &sb, resolved_path); + ret = read_attributes(resolved_path, path, &sb); if (ret < 0) { DPRINTF(E_LOG, L_SCAN, "Skipping %s, read_attributes() failed\n", path); diff --git a/src/library/filescanner_playlist.c b/src/library/filescanner_playlist.c index 2350a5bc..7e51c04a 100644 --- a/src/library/filescanner_playlist.c +++ b/src/library/filescanner_playlist.c @@ -122,7 +122,7 @@ process_url(const char *path, time_t mtime, int extinf, struct media_file_info * } static int -process_regular_file(char *path, char **filename) +process_regular_file(char **filename, char *path) { int i; int mfi_id; @@ -333,7 +333,7 @@ scan_playlist(char *file, time_t mtime, int dir_id) /* Regular file, should already be in library */ else { - ret = process_regular_file(path, &plitem_path); + ret = process_regular_file(&plitem_path, path); } if (ret == 0)