mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-08 14:16:00 +01:00
Append slashes to directories in cc_open
This patch appends slashes to directories in cc_open. In addition lines in zathurarc that do not end with a new line won't be ignored anymore. Thanks to Trundle
This commit is contained in:
parent
c0b64c85e9
commit
10526bf794
1 changed files with 7 additions and 1 deletions
|
@ -1347,7 +1347,7 @@ read_configuration()
|
||||||
int n = g_strv_length(lines) - 1;
|
int n = g_strv_length(lines) - 1;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < n; i++)
|
for(i = 0; i <= n; i++)
|
||||||
{
|
{
|
||||||
if(!strlen(lines[i]))
|
if(!strlen(lines[i]))
|
||||||
continue;
|
continue;
|
||||||
|
@ -3359,6 +3359,12 @@ cc_open(char* input)
|
||||||
out_of_memory();
|
out_of_memory();
|
||||||
|
|
||||||
el->value = g_strdup_printf("%s%s", path, d_name);
|
el->value = g_strdup_printf("%s%s", path, d_name);
|
||||||
|
if(g_file_test(el->value, G_FILE_TEST_IS_DIR))
|
||||||
|
{
|
||||||
|
gchar *subdir = el->value;
|
||||||
|
el->value = g_strdup_printf("%s/", subdir);
|
||||||
|
g_free(subdir);
|
||||||
|
}
|
||||||
el->description = NULL;
|
el->description = NULL;
|
||||||
el->next = NULL;
|
el->next = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue