From 06c0e78098925d36a331fc471d6f48cf924eee3f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 4 May 2009 16:38:54 +0200 Subject: [PATCH] wordpad: work around Vista Vista's wordpad seems to lose the current working directory, so add a workaround: if there was only one argument, and it is a relative path, prepend the current working directory explicitely. Signed-off-by: Johannes Schindelin --- bin/wordpad | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/wordpad b/bin/wordpad index bdf0ac9f..1df3fb09 100644 --- a/bin/wordpad +++ b/bin/wordpad @@ -2,6 +2,12 @@ WORDPAD=$(echo "$PROGRAMFILES/Windows NT"/*/wordpad.exe) +test $# = 1 && +case "$1" in +\\*|/*|?:*) ;; # do nothing +*) set "$(pwd)/$1";; +esac + test -x "$WORDPAD" && exec "$WORDPAD" "$@" echo "Could not launch $WORDPAD" -- 2.11.4.GIT