diff options
author | Raphael Jolly <rjolly@users.sourceforge.net> | 2013-03-22 20:17:14 +0100 |
---|---|---|
committer | Raphael Jolly <rjolly@users.sourceforge.net> | 2013-03-22 20:17:14 +0100 |
commit | 6ec6f69be2863056c1f10c56406e5a72f2e184cb (patch) | |
tree | 52adfba779b9f8ee328cb8ff702e4cb3c139bee5 /src/reflect/scala | |
parent | 426cec50f343f6c936349e7e0cab774423218d66 (diff) | |
download | scala-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')
-rw-r--r-- | src/reflect/scala/reflect/io/ZipArchive.scala | 6 |
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() |