File: quote_source_file_in_script_pocketmod.patch

package info (click to toggle)
gtg 0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,492 kB
  • sloc: xml: 20,785; python: 17,657; sh: 158; makefile: 93
file content (25 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Francois Mazen <francois@mzf.fr>
Date: Tue, 1 Apr 2025 17:44:11 -0300
Subject: SOURCEFILE was not quoted and wasn't handling spaces in the path of
 the source file

Forwarded: https://github.com/getting-things-gnome/gtg/pull/937
---
 GTG/plugins/export/export_templates/script_pocketmod | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/GTG/plugins/export/export_templates/script_pocketmod b/GTG/plugins/export/export_templates/script_pocketmod
index 14c893f..6c44140 100644
--- a/GTG/plugins/export/export_templates/script_pocketmod
+++ b/GTG/plugins/export/export_templates/script_pocketmod
@@ -22,8 +22,8 @@
 
 TMPFOLDER=`mktemp -d /tmp/pocketmod.XXXXXXXXXX`
 OUTFILE=`mktemp /tmp/pockemod.XXXXXXXXXXXXX`.pdf
-SOURCEFILE=$1
-pdflatex -interaction nonstopmode -output-directory $TMPFOLDER -jobname temp $SOURCEFILE  1>&2
+SOURCEFILE="$1"
+pdflatex -interaction nonstopmode -output-directory $TMPFOLDER -jobname temp "$SOURCEFILE"  1>&2
 PDFFILE=$TMPFOLDER/temp.pdf
 pdftk $PDFFILE cat 6 7 8 1 output $TMPFOLDER/seite6781.pdf   1>&2
 pdftk $PDFFILE cat 5 4 3 2 output $TMPFOLDER/seite5432.pdf   1>&2