@@ -73,6 +73,7 @@ private static void copyFromJar(String f,File t) throws IOException{
7373
7474 // generic file copy
7575 public static void copyFile ( File from , File to ) throws IOException {
76+ System .out .printf ("copy resource from '%s' to '%s'\n " , from , to );
7677 if ( !to .exists () ) { to .createNewFile (); }
7778
7879 try (
@@ -85,13 +86,12 @@ public static void copyFile( File from, File to ) throws IOException {
8586
8687 // copy a file either form the jar or from a special resources directory
8788 public static void copyResource (String f , File to ) throws IOException {
88- String basePath = File .separator + "resources" + File .separator ;
8989 try {
9090 /* try jar first ... */
91- copyFromJar (basePath + f , to );
91+ copyFromJar ("/resources/" + f , to );
9292 } catch (IOException e ){
9393 /* .. no? This means that we are debugging in an IDE? */
94- copyFile (new File (".." +basePath +f ), to );
94+ copyFile (new File (".." +File . separator + "resources" + File . separator +f ), to );
9595 }
9696 }
9797
@@ -105,7 +105,7 @@ public Result(String resDir) throws IOException {
105105
106106 // return a listing file to be created
107107 public File getListingFile (String path ) {
108- path = path .replaceAll (Pattern . quote ( File . separator ) ,"%2F" );
108+ path = path .replaceAll ("/" ,"%2F" );
109109 File f = new File (filDir , path +".xml" );
110110 return f ;
111111 }
0 commit comments