app/dialogs/file-open-dialog.c (file_open_dialog_response) don't bail out
2005-02-12 Michael Natterer <mitch@gimp.org> * app/dialogs/file-open-dialog.c (file_open_dialog_response) * app/dialogs/file-save-dialog.c (file_save_dialog_response): don't bail out if filename_from_uri() returns NULL. Perform checks for G_FILE_TEST_IS_REGULAR and G_FILE_TEST_EXISTS only on local files. (This brings up the problem that we will overwrite existing remote files without warning. Need to fix that before enabling remote files in GimpFileDialog).
This commit is contained in:
committed by
Michael Natterer
parent
fc677ae7b4
commit
ce42884e50
@ -124,35 +124,40 @@ file_open_dialog_response (GtkWidget *open_dialog,
|
||||
{
|
||||
gchar *filename = file_utils_filename_from_uri (list->data);
|
||||
|
||||
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
|
||||
if (filename)
|
||||
{
|
||||
if (dialog->gimage)
|
||||
{
|
||||
if (file_open_dialog_open_layer (open_dialog,
|
||||
dialog->gimage,
|
||||
list->data,
|
||||
list->data,
|
||||
dialog->file_proc))
|
||||
{
|
||||
success = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (file_open_dialog_open_image (open_dialog,
|
||||
gimp,
|
||||
list->data,
|
||||
list->data,
|
||||
dialog->file_proc))
|
||||
{
|
||||
success = TRUE;
|
||||
gboolean regular = g_file_test (filename, G_FILE_TEST_IS_REGULAR);
|
||||
|
||||
gdk_window_raise (open_dialog->window);
|
||||
}
|
||||
}
|
||||
g_free (filename);
|
||||
|
||||
if (! regular)
|
||||
continue;
|
||||
}
|
||||
|
||||
g_free (filename);
|
||||
if (dialog->gimage)
|
||||
{
|
||||
if (file_open_dialog_open_layer (open_dialog,
|
||||
dialog->gimage,
|
||||
list->data,
|
||||
list->data,
|
||||
dialog->file_proc))
|
||||
{
|
||||
success = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (file_open_dialog_open_image (open_dialog,
|
||||
gimp,
|
||||
list->data,
|
||||
list->data,
|
||||
dialog->file_proc))
|
||||
{
|
||||
success = TRUE;
|
||||
|
||||
gdk_window_raise (open_dialog->window);
|
||||
}
|
||||
}
|
||||
|
||||
if (dialog->canceled)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user