Handle relative paths more gracefully

OBS-URL: https://build.opensuse.org/package/show/Printing/gswrap?expand=0&rev=8
This commit is contained in:
Dr. Werner Fink 2020-01-10 10:52:24 +00:00 committed by Git OBS Bridge
parent ace5a11ad1
commit 3341fed640
2 changed files with 7 additions and 2 deletions

4
gswrap
View File

@ -104,8 +104,6 @@ do
trap "finish '$PWD' '$tmp'" ERR EXIT SIGINT SIGHUP trap "finish '$PWD' '$tmp'" ERR EXIT SIGINT SIGHUP
opts[o++]="--bind ${tmp+"$tmp"} $home/out" opts[o++]="--bind ${tmp+"$tmp"} $home/out"
fi fi
# change to new working directory in sandbox
opts[o++]="--chdir $home/out"
fi fi
argv[argc]="-sOutputFile=$home/out/${file}" argv[argc]="-sOutputFile=$home/out/${file}"
continue continue
@ -129,6 +127,8 @@ do
then then
opts[o++]="--ro-bind $arg $home/$arg" opts[o++]="--ro-bind $arg $home/$arg"
else else
arg="$(realpath $arg)" || exit 1
argv[argc]="$arg"
test "$arg" != / || continue test "$arg" != / || continue
test "$arg" != /home || continue test "$arg" != /home || continue
test "$arg" != $home || continue test "$arg" != $home || continue

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jan 10 10:51:59 UTC 2020 - Dr. Werner Fink <werner@suse.de>
- Handle relative paths more gracefully
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 10 08:53:48 UTC 2020 - Dr. Werner Fink <werner@suse.de> Fri Jan 10 08:53:48 UTC 2020 - Dr. Werner Fink <werner@suse.de>