summaryrefslogtreecommitdiff
path: root/src/fe-common/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common/core')
-rw-r--r--src/fe-common/core/completion.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c
index e545451b..4a182ccd 100644
--- a/src/fe-common/core/completion.c
+++ b/src/fe-common/core/completion.c
@@ -204,6 +204,8 @@ GList *filename_complete(const char *path)
if (dirp == NULL) return NULL;
dir = g_dirname(path);
+ if (*dir == G_DIR_SEPARATOR && dir[1] == '\0')
+ *dir = '\0'; /* completing file in root directory */
basename = g_basename(path);
len = strlen(basename);