summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/file-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file-utils.c b/src/file-utils.c
index e3e1fc3..5535566 100644
--- a/src/file-utils.c
+++ b/src/file-utils.c
@@ -445,7 +445,7 @@ const gchar* file_name_from_path(const gchar *file_name)
if (file_name == NULL)
return NULL;
- if (file_name[0] == '\0')
+ if ((file_name[0] == '\0') || (strlen (file_name) == 0))
return "";
last_char = strlen (file_name) - 1;