Osgeo4w.bat problem with setting root
|Reported by:||maphew||Owned by:||maphew|
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=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 pkg-shell will have a fix.