From: John Darrington Date: Sat, 1 Aug 2009 09:10:03 +0000 (+0200) Subject: Prevent existing output file from interfereing with zip X-Git-Tag: sid-i386-build98~22 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5327298634757867c01485a8d0097b33c785a94;p=pspp-builds.git Prevent existing output file from interfereing with zip --- 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);