From: Carlos Garcia Campos Date: Fri, 6 Nov 2009 12:37:07 +0000 (+0100) Subject: [shell] Fix loading of remote files X-Git-Tag: EVINCE_2_29_2~24 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=c93a4600cd131defae675a19604990cb4dc32cb3;p=evince.git [shell] Fix loading of remote files It was broken by the temp file handling rework --- diff --git a/shell/ev-window.c b/shell/ev-window.c index 6f98711f..54be8b7a 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1718,7 +1718,7 @@ ev_window_load_file_remote (EvWindow *ev_window, * it helps to resolve some mime types, say cbz. */ base_name = g_file_get_basename (source_file); - template = g_build_filename ("document.XXXXXX-%s", base_name, NULL); + template = g_strdup_printf ("document.XXXXXX-%s", base_name); g_free (base_name); tmp_file = ev_mkstemp_file (template, &err); @@ -1740,7 +1740,8 @@ ev_window_load_file_remote (EvWindow *ev_window, target_file = g_file_new_for_uri (ev_window->priv->local_uri); g_file_copy_async (source_file, target_file, - 0, G_PRIORITY_DEFAULT, + G_FILE_COPY_OVERWRITE, + G_PRIORITY_DEFAULT, ev_window->priv->progress_cancellable, (GFileProgressCallback)window_open_file_copy_progress_cb, ev_window,