summaryrefslogtreecommitdiff
path: root/shell/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-09-27 11:54:22 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-09-27 11:54:22 +0000
commitb37864c789b48e846e7084abb7e043d47fadc026 (patch)
tree10737102b4a87d05e5540217856b96c783485de0 /shell/source
parent4f28dc8748d26404c0a8d6a595fc53f0d7fa7cc9 (diff)
INTEGRATION: CWS shellfix03 (1.2.114); FILE MERGED
2005/08/09 13:30:36 obr 1.2.114.1: #i44886# reworked temp file code
Diffstat (limited to 'shell/source')
-rwxr-xr-xshell/source/unix/misc/cde-open-url.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/shell/source/unix/misc/cde-open-url.sh b/shell/source/unix/misc/cde-open-url.sh
index 0f463de52815..6eaa584a76d0 100755
--- a/shell/source/unix/misc/cde-open-url.sh
+++ b/shell/source/unix/misc/cde-open-url.sh
@@ -49,11 +49,14 @@ case `uname -s` in
;;
esac
-# special handling for mailto: uris
-if echo $1 | grep '^mailto:' > /dev/null; then
- ( echo $1 > /tmp/$$.mailto; dtaction Open /tmp/$$.mailto; rm -f /tmp/$$.mailto ) &
+if [ -x /usr/bin/mktemp ]
+then
+ TMPFILE=`mktemp -t open-url.XXXXXX`
else
- ( echo $1 > /tmp/$$.url; dtaction Browse /tmp/$$.url; rm -f /tmp/$$.url ) &
+ DTTMPDIR=`xrdb -query | grep DtTmpDir`
+ TMPFILE=${DTTMPDIR:-$HOME/.dt/tmp}/open-url.$$
fi
+if [ -z "$TMPFILE" ]; then exit 1; fi
+( echo $1 > "$TMPFILE"; dtaction Open "$TMPFILE"; rm -f "$TMPFILE" ) &
exit 0