Changeset 7752


Ignore:
Timestamp:
09/14/11 15:48:45 (8 years ago)
Author:
hinerm
Message:

Jar2Lib now converts "\" to "/" in discovered jar paths

On Windows, the presence of '\' in discovered jar paths was causing files to not be found
during post-build copies.

All paths are always separated with "/" now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/jar2lib/src/main/java/loci/jar2lib/Jar2Lib.java

    r7709 r7752  
    215215    generateSkeleton(); 
    216216    copySourceFiles(); 
     217    correctJarPaths(); 
    217218    generateHeaders(); 
    218219    generateProxies(); 
     
    223224 
    224225    log("--> Done"); 
     226  } 
     227 
     228  /** 
     229   * Replaces instances of '\' in the jar paths with '/' 
     230   */ 
     231  public void correctJarPaths() { 
     232 
     233    ArrayList<String> tmpLibJars = new ArrayList<String>(); 
     234 
     235    for (String jarPath : libraryJars) { 
     236      tmpLibJars.add(jarPath.replace('\\', '/')); 
     237    } 
     238    setLibraryJars(tmpLibJars);  
    225239  } 
    226240 
Note: See TracChangeset for help on using the changeset viewer.