Bug 17789

Summary: db2html fails for relative input file paths
Product: [Retired] Red Hat Linux Reporter: Paul Flinders <ptf>
Component: stylesheetsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-02 22:02:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Flinders 2000-09-22 14:56:02 UTC
db2html has the following code - it appears that the author checked
for the input file being in the current working dir with the
$1 = `basename $1` test

mkdir $TMPDIR
SAVE_PWD=`pwd`
if [ $1 = `basename $1` ]; then
  echo "working on ../$1"
  (cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html ../$1; cd
$SAVE_PWD)
else
  echo "working on $1"
  (cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html $1; cd
$SAVE_PWD)
fi

Unfortunately this fails if the input file has a relative path to the
current working dir - including ./input_file - trying to build bonobo
triggers this bug.

Comment 1 Paul Flinders 2000-09-22 15:04:59 UTC
Oh yes and the "cd $SAVE_PWD" at the end isn't needed as the command is run in a
sub shell

Comment 2 Tim Waugh 2000-10-04 15:16:06 UTC
In 1.57-1 I've changed:

if [ $1 = `basename $1` ]; then

to

if [ ! -z ${1%%/*} ]; then