fixed zip file system caching for different file systems from the same archive

This commit is contained in:
Florian Nücke 2014-02-03 01:35:47 +01:00
parent a5e7ffa3bb
commit e3db6d06b9

View File

@ -66,7 +66,7 @@ object ZipFileInputStreamFileSystem {
build[String, ArchiveDirectory]() build[String, ArchiveDirectory]()
def fromFile(file: io.File, innerPath: String) = this.synchronized { def fromFile(file: io.File, innerPath: String) = this.synchronized {
Option(cache.get(file.getPath, new Callable[ArchiveDirectory] { Option(cache.get(file.getPath + ":" + innerPath, new Callable[ArchiveDirectory] {
def call = try { def call = try {
val zip = new ZipFile(file.getPath) val zip = new ZipFile(file.getPath)
val cleanedPath = innerPath.stripPrefix("/").stripSuffix("/") + "/" val cleanedPath = innerPath.stripPrefix("/").stripSuffix("/") + "/"