mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-14 18:43:45 +01:00
Fix leading slash in cc_open
This commit is contained in:
parent
b8470a5317
commit
eeee28b0cb
@ -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…
Reference in New Issue
Block a user