diff --git a/src/filelist.c b/src/filelist.c
index 49355c49ed7ae05132195285c8e0f66d3a6d0a58..e70e00346f6da5fdcecb418553d1ba07bfb3f5e5 100644
--- a/src/filelist.c
+++ b/src/filelist.c
@@ -202,7 +202,7 @@ void add_file_to_filelist_recursively(char *origpath, unsigned char level)
 	struct stat st;
 	char *path;
 
-	if (!origpath)
+	if (!origpath || *origpath == '\0')
 		return;
 
 	path = estrdup(origpath);