Bug 165338 - `basename` fails to handle path with white space
`basename` fails to handle path with white space
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: xmlto (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
http://www.cygwin.com/ml/cygwin/2004-...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-08 04:08 EDT by Austin Tuan
Modified: 2008-08-02 19:40 EDT (History)
1 user (show)

See Also:
Fixed In Version: FC6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-22 10:11:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Austin Tuan 2005-08-08 04:08:07 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-TW; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

Description of problem:
In cygwin, it seems that command `basename` used in `xmlto` fails to handle path with white space. I do not have Fedora with me now, but the xmlto binary(script) is the same, so I assume this might also happen on Fedora.

(Below was the original email back in March. Sorry for that, I should use bugzilla instead of personal email...)
============
Hi Tim,
   First I would like to thank you for this nice tool. I'm very
surprised when I know that it's written in bash script!
   I would like to mention an error when using xmlto under cygwin.
It's the first time I use xmlto, and I ran into a "basename" warning.
Google search take me to some previous discussion on Cygwin List.
Please take a look at the below message, in which the 1st problem is
the same as mine:
http://www.cygwin.com/ml/cygwin/2004-01/msg01002.html
   I'm a newbie to XML, but it seems that the modification that Elvin
Peterson suggested in the below email did solve my problem. (I copied
xmlto as xmltotest, modified as suggested, tested okay)
http://www.cygwin.com/ml/cygwin/2004-01/msg01027.html
   Is it possible for you to adopt this change?

Thanks,
Austin Tuan @ Taipei, Taiwan
============

Version-Release number of selected component (if applicable):
xmlto-0.0.18-8

How reproducible:
Always

Steps to Reproduce:
1.Change directory so that your path include white space, such as "/cygdrive/d/My Documents/Austin Tuan/article/OpenNMS/docs/install"
2.Run `xmlto` from here, such as `xmlto html-nochunks book.xml`
3.The warning would be 
basename: extra operand `Tuan/article/OpenNMS/docs/install/book'
Try `basename --help' for more information.


Actual Results:  Still I could get the result html, but the filename would be something like "xmlto.Kk3332.html"

Expected Results:  1. Success without warnings
2. The desired filename should be "book.html" in this case

Additional info:
Comment 1 Gerwin Krist 2005-08-08 06:59:09 EDT
Target is windows and this problem is not on fedora based machines.
So closing it.

cheers!
Comment 2 Tim Waugh 2005-08-08 07:29:15 EDT
No, this looks like it affects Fedora Core too.
Comment 3 Tim Waugh 2005-08-08 09:06:45 EDT
This should be fixed in xmlto-0.0.18-9 in Fedora Core devel.

I seem to have.. er.. "misplaced" the CVS repository for xmlto, so this is not
fixed upstream yet.
Comment 4 Gerwin Krist 2005-08-08 10:36:52 EDT
Sorry my bad, i tested it the other way ...
Comment 5 Christian Iseli 2007-01-22 06:09:28 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

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