Ignore:
Timestamp:
2019-12-02T20:43:20+13:00 (4 years ago)
Author:
ak19
Message:

Got the filenameToURLEncoding(String) variant that reuses fileToURLEncoding(File) to work now. It just needed the current directory path (whatever . resolves to) to be removed from the String filepath returned, something Dr Bainbridge had anticipated could also happen with new URI() but that didn't happen there but does happen with file.toURI() as he had also expected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/metadata/FilenameEncoding.java

    r33737 r33738  
    376376   
    377377    // follows Dr Bainbridge's method below, but with a String parameter instead of a file parameter
    378     public static String filenameToURLEncoding(String filename) {
     378    public static String UNUSED_filenameToURLEncoding(String filename) {
    379379        if(!MULTIPLE_FILENAME_ENCODINGS_SUPPORTED) {
    380380            return filename;
     
    424424   
    425425    // follows Dr Bainbridge's method below, but with a String parameter instead of a file parameter   
    426     public static String _filenameToURLEncoding(String filename) {
     426    public static String filenameToURLEncoding(String filename) {
    427427        if(!MULTIPLE_FILENAME_ENCODINGS_SUPPORTED) { // on a UTF-8 file system, DO NOT do the stuff below, just return input param
    428428            return filename;
Note: See TracChangeset for help on using the changeset viewer.