Remove initial / if present SwitchFlow
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Wed, 15 Apr 2015 11:51:04 +0200
branchSwitchFlow
changeset 18213726b0a034d5
parent 1820 33ef5fe79475
Remove initial / if present
rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java
     1.1 --- a/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Thu Apr 02 15:07:24 2015 +0200
     1.2 +++ b/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Wed Apr 15 11:51:04 2015 +0200
     1.3 @@ -140,6 +140,9 @@
     1.4                  if (is != null) {
     1.5                      return is;
     1.6                  }
     1.7 +                if (resource.startsWith("/")) {
     1.8 +                    resource = resource.substring(1);
     1.9 +                }
    1.10                  is = jf.getInputStream(new ZipEntry(resource));
    1.11                  return is == null ? super.get(resource) : is;
    1.12              }