From: Carlos Garcia Campos Date: Sun, 27 Jan 2008 18:07:48 +0000 (+0000) Subject: Fix printing in dvi backend when filename contains white espaces. Fixes X-Git-Tag: EVINCE_2_21_90~7 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=07631c9aedfe25990c1b723c5ee56088b6d2ea61;p=evince.git Fix printing in dvi backend when filename contains white espaces. Fixes 2008-01-27 Carlos Garcia Campos * backend/dvi/dvi-document.c: (dvi_document_file_exporter_end): Fix printing in dvi backend when filename contains white espaces. Fixes bug #502839. svn path=/trunk/; revision=2865 --- diff --git a/ChangeLog b/ChangeLog index e7d5c298..dc6e1204 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-01-27 Carlos Garcia Campos + + * backend/dvi/dvi-document.c: (dvi_document_file_exporter_end): + + Fix printing in dvi backend when filename contains white + espaces. Fixes bug #502839. + 2008-01-26 Carlos Garcia Campos * cut-n-paste/totem-screensaver/totem-scrsaver.c: diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c index 1e82fb31..c8295232 100644 --- a/backend/dvi/dvi-document.c +++ b/backend/dvi/dvi-document.c @@ -363,7 +363,7 @@ dvi_document_file_exporter_begin (EvFileExporter *exporter, if (dvi_document->exporter_filename) g_free (dvi_document->exporter_filename); - dvi_document->exporter_filename = g_strdup(fc->filename); + dvi_document->exporter_filename = g_strdup (fc->filename); if (dvi_document->exporter_opts) { g_string_free (dvi_document->exporter_opts, TRUE); @@ -377,7 +377,7 @@ dvi_document_file_exporter_do_page (EvFileExporter *exporter, { DviDocument *dvi_document = DVI_DOCUMENT(exporter); - g_string_append_printf(dvi_document->exporter_opts, "%d,", (rc->page)+1); + g_string_append_printf (dvi_document->exporter_opts, "%d,", (rc->page) + 1); } static void @@ -390,7 +390,7 @@ dvi_document_file_exporter_end (EvFileExporter *exporter) DviDocument *dvi_document = DVI_DOCUMENT(exporter); - command_line = g_strdup_printf ("dvipdfm %s -o %s %s", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */ + command_line = g_strdup_printf ("dvipdfm %s -o %s \"%s\"", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */ dvi_document->exporter_opts->str, dvi_document->exporter_filename, dvi_document->context->filename); @@ -401,7 +401,7 @@ dvi_document_file_exporter_end (EvFileExporter *exporter) &exit_stat, &err); - g_free(command_line); + g_free (command_line); if (success == FALSE) { g_warning ("Error: %s", err->message); @@ -410,7 +410,7 @@ dvi_document_file_exporter_end (EvFileExporter *exporter) } if (err) - g_error_free(err); + g_error_free (err); } static EvFileExporterCapabilities