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:
Moritz Lipp 2010-06-24 14:07:26 +02:00
parent c0b64c85e9
commit 10526bf794

View file

@ -1347,7 +1347,7 @@ read_configuration()
int n = g_strv_length(lines) - 1;
int i;
for(i = 0; i < n; i++)
for(i = 0; i <= n; i++)
{
if(!strlen(lines[i]))
continue;
@ -3359,6 +3359,12 @@ cc_open(char* input)
out_of_memory();
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->next = NULL;