summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-08-18 00:02:17 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-08-18 00:02:17 +0200
commit716a779cae7bdeddb66fe99e83725384d1dcb182 (patch)
tree61432c7020940df713939ee91e9dda27bc3a716f
parentee2b3ce4b8436a0bb95d83c482884df48f7d0459 (diff)
Issue a warning instead of testing directory with g_assert.
-rw-r--r--commands.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands.c b/commands.c
index d4b15f3..a02fd72 100644
--- a/commands.c
+++ b/commands.c
@@ -34,7 +34,11 @@ static void commands_list(GSocketConnection *connection, const gchar *cmd) {
g_strfreev(data);
struct directory *directory = music_find_dir(dirname);
- g_assert(directory != NULL);
+ if(directory == NULL) {
+ g_warning("couldn't find directory %s", dirname);
+ send_404(connection);
+ return;
+ }
GString *list_string = g_string_new(NULL);