Closed Bug 275438 Opened 21 years ago Closed 19 years ago

[PATCH] firefox -v gives an error

Categories

(Toolkit :: Startup and Profile System, defect)

All
FreeBSD
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: girgen, Unassigned)

References

Details

the file browser/app/mozilla.in user expr without prefixing arguments with `--'. This means typing "firefox -v" gives me an error, The fix is simple, see patch: --- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004 +++ browser/app/mozilla.in Sun Dec 19 17:44:44 2004 @@ -160,7 +161,7 @@ _optLast="${i}" done #last arg -if [ `expr "${_optLast}" : '.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then +if [ `expr -- "${_optLast}" : '.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then # Last argument seems to be a local file/directory # Check, if it is absolutely specified (ie. /home/foo/file vs. ./file) # If it is just "relatively" (./file) specified, make it absolutely
Confirming for FreeBSD 5.3 with a current trunk build. FreeBSD 4.x may not be affected, because as soon as you enable FreeBSD 4.x compatibility for expr (export EXPR_COMPAT=yes) you get no error.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: Other → All
Summary: [PATCH] firefox -v givers an error → [PATCH] firefox -v gives an error
Version: 1.0 Branch → Trunk
(In reply to comment #1) > Confirming for FreeBSD 5.3 with a current trunk build. FreeBSD 4.x may not be > affected, because as soon as you enable FreeBSD 4.x compatibility for expr > (export EXPR_COMPAT=yes) you get no error. Ah, true! 4.x's expr is not POSIX compliant, hence you cannot use `--'. Instead, use this construct: ... if [ `expr X"${_optLast}" : '.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLa st}" \) ]; then ... See the FreeBSD port for a complete patch: http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/firefox/files/patch-browser_app_mozilla.in?rev=1.5&content-type=text/x-cvsweb-markup Regards, Palle
Blocks: 264410
Assignee: benjamin → nobody
WFM on current trunk build on FreeBSD 6.0-Beta. "firefox -v" displays: Mozilla Firefox 1.0+, Copyright (c) 1998 - 2005 mozilla.org Don't know whether things changed in Mozilla or in FreeBSD, though.
By now "firefox -v" should work without problem on any actively maintained and supported version of FreeBSD. Marking as fixed. Should somebody still encounter a problem, please reopen this bug.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.