From b5327298634757867c01485a8d0097b33c785a94 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 1 Aug 2009 11:10:03 +0200 Subject: [PATCH] Prevent existing output file from interfereing with zip --- src/output/odt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output/odt.c b/src/output/odt.c index d5658e89..59a628a6 100644 --- a/src/output/odt.c +++ b/src/output/odt.c @@ -236,7 +236,7 @@ odt_close_driver (struct outp_driver *this) /* Zip up the directory */ ds_init_empty (&zip_cmd); - ds_put_format (&zip_cmd, "cd %s ; zip -r ../pspp.odt . > /dev/null", x->dirname); + ds_put_format (&zip_cmd, "cd %s ; rm -f ../pspp.odt; zip -q -X ../pspp.odt mimetype; zip -q -X -u -r ../pspp.odt .", x->dirname); system (ds_cstr (&zip_cmd)); ds_destroy (&zip_cmd); -- 2.30.2