Bug 17789 - db2html fails for relative input file paths
db2html fails for relative input file paths
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: stylesheets (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-22 10:56 EDT by Paul Flinders
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-02 18:02:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Flinders 2000-09-22 10:56:02 EDT
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 11:04:59 EDT
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 11:16:06 EDT
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.