mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 16:25:03 -05:00
[filescanner] Switch misplaced arguments in process_directories (FreeBSD)
Should help with issue #239. Also change process_directory so it uses same argument order as process_directories.
This commit is contained in:
parent
42e68311eb
commit
a22aff5d1f
@ -967,7 +967,7 @@ create_virtual_path(char *path, char *virtual_path, int virtual_path_len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
process_directory(char *path, int flags, int parent_id)
|
process_directory(char *path, int parent_id, int flags)
|
||||||
{
|
{
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
struct dirent buf;
|
struct dirent buf;
|
||||||
@ -1189,14 +1189,14 @@ process_directories(char *root, int parent_id, int flags)
|
|||||||
{
|
{
|
||||||
struct stacked_dir *dir;
|
struct stacked_dir *dir;
|
||||||
|
|
||||||
process_directory(root, flags, parent_id);
|
process_directory(root, parent_id, flags);
|
||||||
|
|
||||||
if (scan_exit)
|
if (scan_exit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while ((dir = pop_dir(&dirstack)))
|
while ((dir = pop_dir(&dirstack)))
|
||||||
{
|
{
|
||||||
process_directory(dir->path, flags, dir->parent_id);
|
process_directory(dir->path, dir->parent_id, flags);
|
||||||
|
|
||||||
free(dir->path);
|
free(dir->path);
|
||||||
free(dir);
|
free(dir);
|
||||||
@ -2065,7 +2065,7 @@ kqueue_cb(int fd, short event, void *arg)
|
|||||||
|
|
||||||
while ((d = pop_dir(&rescan)))
|
while ((d = pop_dir(&rescan)))
|
||||||
{
|
{
|
||||||
process_directories(d->path, 0, d->parent_id);
|
process_directories(d->path, d->parent_id, 0);
|
||||||
|
|
||||||
free(d->path);
|
free(d->path);
|
||||||
free(d);
|
free(d);
|
||||||
|
Loading…
Reference in New Issue
Block a user