aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-10-04 09:34:48 +0200
committerMax Kellermann <max@duempel.org>2012-10-04 10:31:53 +0200
commitefbf184fe80c61f7666ded3342fcb97c1b770758 (patch)
tree82a7e8abd83e7edd68a1983ca16daae6753d625e /src/PlaylistFile.cxx
parentdd577fb857141bc0d8bfa094a4697163b17deaad (diff)
downloadmpd-efbf184fe80c61f7666ded3342fcb97c1b770758.tar.gz
mpd-efbf184fe80c61f7666ded3342fcb97c1b770758.tar.xz
mpd-efbf184fe80c61f7666ded3342fcb97c1b770758.zip
PlaylistFile, client_file, tag_id3: don't use g_file_error_quark()
g_file_error_quark() is meant to be used with the GFileError enum which does not correspond with errno, but must be converted with g_file_error_from_errno(). At the same time, this removes g_strerror() use for g_file_error_quark().
Diffstat (limited to '')
-rw-r--r--src/PlaylistFile.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index cb86c13ac..3223edee3 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -21,6 +21,7 @@
#include "PlaylistFile.hxx"
#include "PlaylistSave.hxx"
#include "song.h"
+#include "io_error.h"
extern "C" {
#include "text_file.h"
@@ -132,8 +133,7 @@ playlist_errno(GError **error_r)
break;
default:
- g_set_error_literal(error_r, g_file_error_quark(), errno,
- g_strerror(errno));
+ set_error_errno(error_r);
break;
}
}
@@ -181,8 +181,7 @@ ListPlaylistFiles(GError **error_r)
DIR *dir = opendir(parent_path_fs);
if (dir == NULL) {
- g_set_error_literal(error_r, g_file_error_quark(), errno,
- g_strerror(errno));
+ set_error_errno(error_r);
return list;
}