From: Darren S. <ds...@us...> - 2004-11-15 18:31:58
|
Update of /cvsroot/xine/gnome-xine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25813/src Modified Files: utils.c Log Message: Unbreak input.file_origin_path handling. Index: utils.c =================================================================== RCS file: /cvsroot/xine/gnome-xine/src/utils.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- utils.c 12 Nov 2004 03:06:19 -0000 1.26 +++ utils.c 15 Nov 2004 18:31:48 -0000 1.27 @@ -262,7 +262,19 @@ done = 1; if (xine_config_lookup_entry (xine, "input.file_origin_path", &entry) && entry.type == XINE_CONFIG_TYPE_STRING) - chdir (entry.str_value); /* errors don't matter */ + { + if (entry.str_value[0] && + entry.str_value[strlen (entry.str_value) - 1] != '/') + { + char *txt = NULL; + asprintf (&txt, "%s/", entry.str_value); + gtk_file_selection_set_filename (GTK_FILE_SELECTION (file_dlg), txt); + free (txt); + } + else + gtk_file_selection_set_filename (GTK_FILE_SELECTION (file_dlg), + entry.str_value); + } } |