Changeset 14143


Ignore:
Timestamp:
Jul 24, 2013, 5:11:21 PM (9 years ago)
Author:
jordan
Message:

(trunk gtk) #5320 'can't opena folder with '#' in its name': in gtr_open_file(), use g_file_new_for_path().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/util.c

    r14142 r14143  
    362362gtr_open_file (const char * path)
    363363{
    364   char * uri;
    365 
    366   if (g_path_is_absolute (path))
    367     {
    368       uri = g_strdup_printf ("file://%s", path);
    369     }
    370   else
    371     {
    372       char * cwd = g_get_current_dir ();
    373       uri = g_strdup_printf ("file://%s/%s", cwd, path);
    374       g_free (cwd);
    375     }
    376 
     364  GFile * file = g_file_new_for_path (path);
     365  gchar * uri = g_file_get_uri (file);
    377366  gtr_open_uri (uri);
    378367  g_free (uri);
     368  g_object_unref (file);
    379369}
    380370
Note: See TracChangeset for help on using the changeset viewer.