(trunk gtk) #5320 'can't opena folder with '#' in its name': in gtr_open_file(), use g_file_new_for_path().
This commit is contained in:
parent
cc1b1cd430
commit
16ab373503
16
gtk/util.c
16
gtk/util.c
|
@ -361,21 +361,11 @@ gtr_get_help_uri (void)
|
|||
void
|
||||
gtr_open_file (const char * path)
|
||||
{
|
||||
char * uri;
|
||||
|
||||
if (g_path_is_absolute (path))
|
||||
{
|
||||
uri = g_strdup_printf ("file://%s", path);
|
||||
}
|
||||
else
|
||||
{
|
||||
char * cwd = g_get_current_dir ();
|
||||
uri = g_strdup_printf ("file://%s/%s", cwd, path);
|
||||
g_free (cwd);
|
||||
}
|
||||
|
||||
GFile * file = g_file_new_for_path (path);
|
||||
gchar * uri = g_file_get_uri (file);
|
||||
gtr_open_uri (uri);
|
||||
g_free (uri);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue