Changeset 29753 for main/trunk/gli


Ignore:
Timestamp:
2015-02-19T16:46:29+13:00 (9 years ago)
Author:
ak19
Message:

Related to commits 29687, 29729, 29730. The changes to incorporating the new servlets.xml in web.xml when GLI launches requires additional processing for windows too, similar to the change for launching the GS3 server, which was part of the previous commit 29752.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/GLIEntityResolver.java

    r29730 r29753  
    149149           
    150150            if(searchFile.exists()) {
    151             DebugStream.println("\t Found " + searchFile.getAbsolutePath());
    152             return new InputSource("file://" + searchFile.getAbsolutePath());
     151                DebugStream.println("\t Found " + searchFile.getAbsolutePath());               
     152           
     153                String newpath = searchFile.getAbsolutePath();     
     154                if(Utility.isWindows()) {           
     155                    newpath = "file:///" + newpath.replace("\\", "/");
     156                } else { // linux version, file protocol starts with file:// and slashes are already URL-style
     157                    newpath = "file://" + newpath;
     158                }
     159                return new InputSource(newpath);
     160               
    153161            }
    154162        }
Note: See TracChangeset for help on using the changeset viewer.