Bug 132097

Summary: mozilla command line url wiith whitspace fails
Product: [Fedora] Fedora Reporter: Marcel Mol <marcel>
Component: mozillaAssignee: Christopher Aillon <caillon>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-03 20:07:38 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:
Bug Depends On:    
Bug Blocks: 123268, 136451    

Description Marcel Mol 2004-09-08 19:27:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040809

Description of problem:
running mozilla from the command line passing it a url that contains
spaces will fail:

$ mozilla "my url.html"
/usr/bin/mozilla: line 214: [: /home/marcel/my: binary operator expected

Mozilla runs fine when renaming the file to my_url.html

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


How reproducible:
Always

Steps to Reproduce:
1. See description

Additional info:

The following patch will fix this:

--- /usr/bin/mozilla    2004-08-09 13:16:16.000000000 +0200
+++ moz 2004-09-08 21:25:11.227702026 +0200
@@ -211,7 +211,7 @@
     # if it doesn't begin with a '/' and it exists when the pwd is
     # prepended to it then append the full path
     echo $opt | grep -e '^/' 2>/dev/null > /dev/null
-    if [ "${RETURN_VAL}" -ne "0" ] && [ -e `pwd`/$opt ]; then
+    if [ "${RETURN_VAL}" -ne "0" ] && [ -e "`pwd`/$opt" ]; then
       opt="`pwd`/$opt"
     fi
     exec $MOZ_CLIENT_PROGRAM "openurl($opt)" 2>/dev/null >/dev/null

Comment 1 Christopher Aillon 2005-05-03 20:07:38 UTC
Fix checked in to devel for firefox and mozilla, will be in the next set of builds.