aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 19:20:59 +0200
committerMax Kellermann <max@duempel.org>2008-10-09 19:20:59 +0200
commitda7166bdd2bdbfc017fabfe20e766ece737a5fe4 (patch)
tree9001cae7ad5925d9bb284769b20c2315a279af98 /src
parent478d0ba7bbbdc3efe6021f40e1fef07ed70a4050 (diff)
downloadmpd-da7166bdd2bdbfc017fabfe20e766ece737a5fe4.tar.gz
mpd-da7166bdd2bdbfc017fabfe20e766ece737a5fe4.tar.xz
mpd-da7166bdd2bdbfc017fabfe20e766ece737a5fe4.zip
update: don't print debug message when song was not modified
When a song file was not modified, MPD printed the debug message "not a directory or music", because the first "if" branch did not return.
Diffstat (limited to 'src')
-rw-r--r--src/update.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/update.c b/src/update.c
index 607959b1a..c4842f142 100644
--- a/src/update.c
+++ b/src/update.c
@@ -252,6 +252,8 @@ updateInDirectory(struct directory *directory,
delete_song(directory, song);
return UPDATE_RETURN_UPDATED;
}
+
+ return UPDATE_RETURN_NOUPDATE;
} else if (S_ISDIR(st->st_mode)) {
struct directory *subdir;
enum update_return ret;
@@ -270,11 +272,10 @@ updateInDirectory(struct directory *directory,
delete_directory(subdir);
return ret;
+ } else {
+ DEBUG("update: %s is not a directory or music\n", name);
+ return UPDATE_RETURN_NOUPDATE;
}
-
- DEBUG("update: %s is not a directory or music\n", name);
-
- return UPDATE_RETURN_NOUPDATE;
}
/* we don't look at hidden files nor files with newlines in them */