Quote fixes for urar.in
Oswald Buddenhagen
ossi at kde.org
Fri Jan 7 17:37:13 UTC 2005
On Fri, Jan 07, 2005 at 05:49:11PM +0100, Roland Illig wrote:
> for dir in $PATH; do
> IFS="$save_IFS"
>
the quotes are superfluous.
> test -z "$dir" && dir=.
> - if test -x $dir/unrar -a -f $dir/unrar; then
> + if test -x "$dir/unrar" -a -f "$dir/unrar"; then
>
just put the IFS reset below the loop (where it fits better anyway) and
no quoting is necessary any more for (hopefully) obvious reasons.
> - UNRAR=$dir/unrar
> + UNRAR="$dir/unrar"
>
superfluous in any case.
> break
> fi
> done
>
> @@ -77,15 +77,15 @@ mcrarfs_mkdir ()
> # preserve pwd. It is clean, but is it necessary?
> pwd=`pwd`
> # Create a directory and create in it a tmp directory with the good name
> - dir=`mktemp -d ${MC_TMPDIR:-/tmp}/mctmpdir-urar.XXXXXX` || exit 1
> - cd $dir
> + dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-urar.XXXXXX"` || exit 1
> + cd "$dir"
> mkdir -p "$2"
>
ever seen a temp dir with spaces? otoh, maybe you want mc to be the sort
of only program that would cope with such a situation gracefully. :)
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the mc-devel
mailing list