Bug 17789 - db2html fails for relative input file paths
Summary: db2html fails for relative input file paths
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: stylesheets
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-22 14:56 UTC by Paul Flinders
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-02 22:02:00 UTC
Embargoed:


Attachments (Terms of Use)

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



Note You need to log in before you can comment on or make changes to this bug.