Commit eeee28b0 authored by Moritz Lipp's avatar Moritz Lipp

Fix leading slash in cc_open

parent b8470a53
......@@ -53,7 +53,13 @@ list_files(zathura_t* zathura, const char* current_path, const char* current_fil
continue;
}
char* full_path = g_strdup_printf("%s%s%s", current_path, is_dir ? "" : "/", e_name);
char* tmp = "/";
if (is_dir == true || g_strcmp0(current_path, "/") == 0) {
tmp = "";
};
char* full_path = g_strdup_printf("%s%s%s", current_path, tmp, e_name);
if (full_path == NULL) {
g_free(e_name);
goto error_free;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment