diff options
author | James D. Smith <smithjd15@gmail.com> | 2021-09-18 21:09:24 -0600 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-09-19 21:05:58 -0400 |
commit | 760277e096cd35629166367352c108d6ab3b59c2 (patch) | |
tree | 75967beb624e48f51943ffa98ff562110e5c1d97 /apps | |
parent | 67716c6b46a7780bff6b80408b3452c01bfbfdc4 (diff) |
Dir cache: Fix resume of relative path playlists.
Slightly modified from original patch by Fabrice Bellard.
Change-Id: I9ae04fa460f0f1b9c616e6f99505d4c5d4358f68
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 49c52a9b7e..0d02be3d48 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -1762,9 +1762,8 @@ static ssize_t format_track_path(char *dest, char *src, int buf_length, * to "/<0>/bar" (aka "/bar" at this time). *fingers crossed* * * If any stripped drive spec was absolute, prepend the playlist - * directory's volume spec, or root if none. Relative paths remain - * relative and the playlist's directory fully qualifies them. Absolute - * UNIX-style paths remain unaltered. + * directory's volume spec, or root if none. Absolute UNIX-style paths + * remain unaltered. */ if (path_strip_drive(src, (const char **)&src, true) >= 0 && src[-1] == PATH_SEPCH) @@ -1782,7 +1781,9 @@ static ssize_t format_track_path(char *dest, char *src, int buf_length, if (len >= (size_t)buf_length) return -1; /* buffer too small */ - return len; + path_remove_dot_segments (dest, dest); + + return strlen (dest); } /* |