xine-ui/xine-ui-0.99.5-mktemp.patch

51 lines
1.6 KiB
Diff
Raw Permalink Normal View History

diff -ru xine-ui-0.99.5/misc/xine-bugreport xine-ui-0.99.5-fix/misc/xine-bugreport
--- xine-ui-0.99.5/misc/xine-bugreport 2005-07-26 18:38:34.000000000 +0000
+++ xine-ui-0.99.5-fix/misc/xine-bugreport 2005-10-13 07:52:53.000000000 +0000
@@ -14,18 +14,11 @@
VERSION=0.9.12
COMMON_PLACES=/:/usr:/usr/local:/usr/local/xine:/usr/xine:/opt:/opt/xine:/usr/X11:/usr/X11R6
-TMP_BASE=/tmp/xine-check.$$
+TMP_BASE=`mktemp -d /tmp/xine-check.XXXXXXXX` ||
+ { echo "Unable to create temp directory. Something is seriously wrong..." >&2
+ exit 1; }
umask 077
-i=1
-while [ $i -lt 99 ] \
- && tmpdir=$TMP_BASE.$i; mkdir $tmpdir; rc=$?; [ $rc != 0 ]; do
- i=`expr $i + 1`
-done
-if [ $rc != 0 ]; then
- echo "Unable to create temp directory. Something is seriously wrong..."
- exit 1
-fi
logfile=""
bugreport=$tmpdir/xine-bugreport
diff -ru xine-ui-0.99.5/misc/xine-check xine-ui-0.99.5-fix/misc/xine-check
--- xine-ui-0.99.5/misc/xine-check 2005-07-26 18:38:34.000000000 +0000
+++ xine-ui-0.99.5-fix/misc/xine-check 2005-10-13 07:53:00.000000000 +0000
@@ -14,18 +14,11 @@
VERSION=0.9.12
COMMON_PLACES=/:/usr:/usr/local:/usr/local/xine:/usr/xine:/opt:/opt/xine:/usr/X11:/usr/X11R6
-TMP_BASE=/tmp/xine-check.$$
+TMP_BASE=`mktemp -d /tmp/xine-check.XXXXXXXX` ||
+ { echo "Unable to create temp directory. Something is seriously wrong..." >&2
+ exit 1; }
umask 077
-i=1
-while [ $i -lt 99 ] \
- && tmpdir=$TMP_BASE.$i; mkdir $tmpdir; rc=$?; [ $rc != 0 ]; do
- i=`expr $i + 1`
-done
-if [ $rc != 0 ]; then
- echo "Unable to create temp directory. Something is seriously wrong..."
- exit 1
-fi
logfile=""
bugreport=$tmpdir/xine-bugreport