Changeset 29752 for main/trunk/greenstone3
- Timestamp:
- 2015-02-19T16:37:12+13:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSEntityResolver.java
r29730 r29752 19 19 package org.greenstone.gsdl3.util; 20 20 21 import org.greenstone.util.Misc; 21 22 22 23 import org.xml.sax.InputSource; … … 71 72 // use the baseFilepath, if one was provided 72 73 if(this.baseFilepath != null) { 73 return new InputSource("file://" + this.baseFilepath + File.separator + temp_id); 74 75 // The file protocol for windows starts with file:/// and has URL slashes 76 // http://en.wikipedia.org/wiki/File_URI_scheme#Windows 77 String newpath = this.baseFilepath + File.separator + temp_id; 78 if(Misc.isWindows()) { 79 newpath = "file:///" + newpath.replace("\\", "/"); 80 System.err.println("### entity resolver for "+"file:///" + newpath); 81 } else { // linux version, file protocol starts with file:// and slashes are already URL-style 82 newpath = "file://" + newpath; 83 } 84 return new InputSource(newpath); 74 85 } 75 86
Note:
See TracChangeset
for help on using the changeset viewer.