Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
35494158
Commit
35494158
authored
Sep 09, 2008
by
Eric Wong
Committed by
Max Kellermann
Sep 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storedPlaylist: correctly expand path when writing
Otherwise we'd be writing to whatever directory that mpd is running in.
parent
5c81b716
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
storedPlaylist.c
src/storedPlaylist.c
+6
-5
No files found.
src/storedPlaylist.c
View file @
35494158
...
...
@@ -59,22 +59,23 @@ static ListNode *nodeOfStoredPlaylist(List *list, int idx)
}
static
enum
playlist_result
writeStoredPlaylistToPath
(
List
*
list
,
const
char
*
fs
path
)
writeStoredPlaylistToPath
(
List
*
list
,
const
char
*
utf8
path
)
{
ListNode
*
node
;
FILE
*
file
;
char
*
s
;
char
path_max_tmp
[
MPD_PATH_MAX
];
assert
(
utf8path
!=
NULL
);
assert
(
fspath
!=
NULL
);
utf8_to_fs_playlist_path
(
path_max_tmp
,
utf8path
);
while
(
!
(
file
=
fopen
(
fspath
,
"w"
))
&&
errno
==
EINTR
);
while
(
!
(
file
=
fopen
(
path_max_tmp
,
"w"
))
&&
errno
==
EINTR
);
if
(
file
==
NULL
)
return
PLAYLIST_RESULT_ERRNO
;
node
=
list
->
firstNode
;
while
(
node
!=
NULL
)
{
char
path_max_tmp
[
MPD_PATH_MAX
];
s
=
utf8_to_fs_charset
(
path_max_tmp
,
(
char
*
)
node
->
data
);
if
(
playlist_saveAbsolutePaths
&&
!
isValidRemoteUtf8Url
(
s
))
s
=
rmp2amp_r
(
path_max_tmp
,
s
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment