src/gtkutils.c

changeset 9534
a85e66272b09
parent 9497
1df8b47b083e
child 9706
d5b657fe9cff
equal deleted inserted replaced
9533:44cc4e512f81 9534:a85e66272b09
747 { 747 {
748 char *dirname; 748 char *dirname;
749 749
750 if (g_file_test(path, G_FILE_TEST_IS_DIR)) { 750 if (g_file_test(path, G_FILE_TEST_IS_DIR)) {
751 /* append a / if needed */ 751 /* append a / if needed */
752 if (path[strlen(path) - 1] != '/') { 752 if (path[strlen(path) - 1] != G_DIR_SEPARATOR) {
753 dirname = g_strconcat(path, "/", NULL); 753 dirname = g_strconcat(path, G_DIR_SEPARATOR_S, NULL);
754 } else { 754 } else {
755 dirname = g_strdup(path); 755 dirname = g_strdup(path);
756 } 756 }
757 gtk_file_selection_set_filename(filesel, dirname); 757 gtk_file_selection_set_filename(filesel, dirname);
758 g_free(dirname); 758 g_free(dirname);

mercurial