summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/io
diff options
context:
space:
mode:
authorRaphael Jolly <rjolly@users.sourceforge.net>2013-03-22 20:17:14 +0100
committerRaphael Jolly <rjolly@users.sourceforge.net>2013-03-22 20:17:14 +0100
commit6ec6f69be2863056c1f10c56406e5a72f2e184cb (patch)
tree52adfba779b9f8ee328cb8ff702e4cb3c139bee5 /src/reflect/scala/reflect/io
parent426cec50f343f6c936349e7e0cab774423218d66 (diff)
downloadscala-6ec6f69be2863056c1f10c56406e5a72f2e184cb.tar.gz
scala-6ec6f69be2863056c1f10c56406e5a72f2e184cb.tar.bz2
scala-6ec6f69be2863056c1f10c56406e5a72f2e184cb.zip
Bypass determination of protection domain when resource is not in a jar
Diffstat (limited to 'src/reflect/scala/reflect/io')
-rw-r--r--src/reflect/scala/reflect/io/ZipArchive.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/io/ZipArchive.scala b/src/reflect/scala/reflect/io/ZipArchive.scala
index 1342fde3c5..11d04538e9 100644
--- a/src/reflect/scala/reflect/io/ZipArchive.scala
+++ b/src/reflect/scala/reflect/io/ZipArchive.scala
@@ -259,7 +259,11 @@ final class ManifestResources(val url: URL) extends ZipArchive(null) {
}
def name = path
- def path: String = url.getPath() match { case s => s.substring(0, s.lastIndexOf('!')) }
+ def path: String = {
+ val s = url.getPath
+ val n = s.lastIndexOf('!')
+ s.substring(0, n)
+ }
def input = url.openStream()
def lastModified =
try url.openConnection().getLastModified()