aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-01 17:49:49 +0100
committerMax Kellermann <max@duempel.org>2009-11-01 17:49:49 +0100
commit7f9ee00980d8d8eceea834695e1415de48c57704 (patch)
tree100ec1b5f51a4d3adc869e004cf882c88b0e216d /src
parent53a749780aec9904f1c04802e12f748c2c9e3eff (diff)
downloadmpd-7f9ee00980d8d8eceea834695e1415de48c57704.tar.gz
mpd-7f9ee00980d8d8eceea834695e1415de48c57704.tar.xz
mpd-7f9ee00980d8d8eceea834695e1415de48c57704.zip
directory_save: partially revert the g_str_has_prefix() patch
Diffstat (limited to '')
-rw-r--r--src/directory_save.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directory_save.c b/src/directory_save.c
index cb740c0c8..e6d3649d0 100644
--- a/src/directory_save.c
+++ b/src/directory_save.c
@@ -123,7 +123,7 @@ directory_load_subdir(FILE *fp, struct directory *parent, const char *name,
}
}
- if (strcmp(line, DIRECTORY_BEGIN) != 0) {
+ if (!g_str_has_prefix(line, DIRECTORY_BEGIN)) {
g_set_error(error_r, directory_quark(), 0,
"Malformed line: %s", line);
directory_free(directory);
@@ -147,7 +147,7 @@ directory_load(FILE *fp, struct directory *directory,
bool success;
while ((line = read_text_line(fp, buffer)) != NULL &&
- strcmp(line, DIRECTORY_END) != 0) {
+ !g_str_has_prefix(line, DIRECTORY_END)) {
if (g_str_has_prefix(line, DIRECTORY_DIR)) {
struct directory *subdir =
directory_load_subdir(fp, directory,