diff options
author | Max Kellermann <max@duempel.org> | 2009-11-01 17:49:49 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-01 17:49:49 +0100 |
commit | 7f9ee00980d8d8eceea834695e1415de48c57704 (patch) | |
tree | 100ec1b5f51a4d3adc869e004cf882c88b0e216d /src/directory_save.c | |
parent | 53a749780aec9904f1c04802e12f748c2c9e3eff (diff) | |
download | mpd-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.c | 4 |
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, |