diff options
author | Max Kellermann <max@duempel.org> | 2013-01-29 17:23:35 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-29 18:09:39 +0100 |
commit | feb8d5b82f3e7c67806d5efbef1e0b86170ec6dd (patch) | |
tree | 8127b30bc339eae03226f3e97ea8ac99f62587b3 /src/PlaylistFile.cxx | |
parent | eb8922f3468fe664211911c49077a4e3442b7703 (diff) | |
download | mpd-feb8d5b82f3e7c67806d5efbef1e0b86170ec6dd.tar.gz mpd-feb8d5b82f3e7c67806d5efbef1e0b86170ec6dd.tar.xz mpd-feb8d5b82f3e7c67806d5efbef1e0b86170ec6dd.zip |
ConfigFile, CommandLine: use the Path class
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistFile.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx index daec5ca0a..278e521ba 100644 --- a/src/PlaylistFile.cxx +++ b/src/PlaylistFile.cxx @@ -31,6 +31,7 @@ #include "conf.h" #include "Idle.hxx" #include "fs/Path.hxx" +#include "fs/FileSystem.hxx" extern "C" { #include "uri.h" @@ -433,14 +434,14 @@ static bool spl_rename_internal(const Path &from_path_fs, const Path &to_path_fs, GError **error_r) { - if (!g_file_test(from_path_fs.c_str(), G_FILE_TEST_IS_REGULAR)) { + if (!FileExists(from_path_fs)) { g_set_error_literal(error_r, playlist_quark(), PLAYLIST_RESULT_NO_SUCH_LIST, "No such playlist"); return false; } - if (g_file_test(to_path_fs.c_str(), G_FILE_TEST_EXISTS)) { + if (FileExists(to_path_fs)) { g_set_error_literal(error_r, playlist_quark(), PLAYLIST_RESULT_LIST_EXISTS, "Playlist exists already"); |