mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-03-01 21:24:50 +01:00
Fix leading slash in cc_open
This commit is contained in:
parent
b8470a5317
commit
eeee28b0cb
1 changed files with 7 additions and 1 deletions
|
@ -53,7 +53,13 @@ list_files(zathura_t* zathura, const char* current_path, const char* current_fil
|
||||||
continue;
|
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) {
|
if (full_path == NULL) {
|
||||||
g_free(e_name);
|
g_free(e_name);
|
||||||
goto error_free;
|
goto error_free;
|
||||||
|
|
Loading…
Add table
Reference in a new issue