Steve Kemp wrote: > On Sun, Nov 20, 2005 at 08:17:17PM +0100, Uwe Zeisberger wrote: > The patch is .. missing. Uuups, sorry, here it comes...
Best regards,
Uwe
--
Uwe Zeisberger
<script>alert("This is a virus for Outlook")</script>
--- /usr/bin/exifautotran 2005-03-02 13:26:24.000000000 +0100
+++ /usr/bin/exifautotran 2005-11-20 19:57:38.612512182 +0100
@@ -3,6 +3,9 @@
#
# Transforms Exif files so that Orientation becomes 1
#
+
+trap "if test -n \"\$tempfile\"; then rm -f \"\$tempfile\"; fi" INT QUIT TERM
+
for i
do
case $i in
@@ -28,13 +31,21 @@
*) transform="";;
esac
if test -n "$transform"; then
+ tempfile=`mktemp`;
+ if test "$?" -ne "0"; then
+ echo "Failed to create temporary file" >&2
+ exit 1;
+ fi
echo Executing: jpegtran -copy all $transform $i >&2
- jpegtran -copy all $transform "$i" > tempfile
+ jpegtran -copy all $transform "$i" > $tempfile
if test $? -ne 0; then
echo Error while transforming $i - skipped. >&2
+ rm "$tempfile"
+ tempfile=
else
rm "$i"
- mv tempfile "$i"
+ mv "$tempfile" "$i"
+ tempfile=
jpegexiforient -1 "$i" > /dev/null
fi
fi
signature.asc
Description: Digital signature

