diff options
author | Max Kellermann <max@duempel.org> | 2014-02-02 23:20:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-03 23:15:57 +0100 |
commit | e4c5a4f61b39b2a813129809f48f539f383a4c5e (patch) | |
tree | e20db4bd6f647b0e0de5b6800fe6f12544d02dbb | |
parent | a8e52ad89f60741adc474d460724e25bc783dfe5 (diff) | |
download | mpd-e4c5a4f61b39b2a813129809f48f539f383a4c5e.tar.gz mpd-e4c5a4f61b39b2a813129809f48f539f383a4c5e.tar.xz mpd-e4c5a4f61b39b2a813129809f48f539f383a4c5e.zip |
PlaylistSave: remove redundant backslash conversion
This is already being done by FixSeparators(), called from
PathToUTF8().
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistSave.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx index d9a0b4a47..f2541e71b 100644 --- a/src/PlaylistSave.cxx +++ b/src/PlaylistSave.cxx @@ -129,22 +129,9 @@ playlist_load_spl(struct playlist &playlist, PlayerControl &pc, continue; } - if ((playlist.AppendURI(pc, uri_utf8.c_str())) != PlaylistResult::SUCCESS) { - /* for windows compatibility, convert slashes */ - char *temp2 = xstrdup(uri_utf8.c_str()); - char *p = temp2; - while (*p) { - if (*p == '\\') - *p = '/'; - p++; - } - - if (playlist.AppendURI(pc, temp2) != PlaylistResult::SUCCESS) - FormatError(playlist_domain, - "can't add file \"%s\"", temp2); - - free(temp2); - } + if ((playlist.AppendURI(pc, uri_utf8.c_str())) != PlaylistResult::SUCCESS) + FormatError(playlist_domain, + "can't add file \"%s\"", uri_utf8.c_str()); } return true; |