[Osgeo4w-trac] [osgeo4w] #276: Osgeo4w.bat problem with setting root
OSGeo4W
trac_osgeo4w at osgeo.org
Wed Mar 14 02:15:15 EDT 2012
#276: Osgeo4w.bat problem with setting root
-------------------+--------------------------------------------------------
Reporter: maphew | Owner: maphew
Type: defect | Status: new
Priority: major | Component: Package
Version: | Keywords: pkg-shell
-------------------+--------------------------------------------------------
Osgeo4w.bat has a line in it to remove the trailing backslash from the
auto-generated OSGEO4W_ROOT variable. Most of the time this works just
fine, however if the root happens to be the top of a drive instead of a
folder unexpected things can happen.
The immediate fix is to REMark out the line, as shown below. It should be
safe and have no functional repercussions.
{{{
rem Remove trailing backslash
rem set OSGEO4W_ROOT=%OSGEO4W_ROOT:~0,-1%
}}}
The purpose of the line is largely cosmetic, it prevents a double
backslash appearing in things like `PATH=%OSGEO4W_ROOT%\bin;` (becomes
`PATH=C:\Osgeo4w\\bin;`). In testing Windows seems to ignore double
slashes faithfully and completely.
Without the fix in place, if osgeo4w_root is a drive letter (`X:`), then
it become relative to whatever the current directory on the drive is
instead of the absolute location.
The next release of [wiki:pkg-shell] will have a fix.
--
Ticket URL: <http://trac.osgeo.org/osgeo4w/ticket/276>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the Osgeo4w-trac
mailing list