From a9aadfe00c48b3545d512a285a16718a6d82f52d Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 1 Jun 2005 15:09:52 +0000 Subject: [PATCH] - Make sure our file has an absolute path, otherwise we run into inconsistent behaviour of File.exists() --- src/helma/framework/repository/ZipRepository.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/repository/ZipRepository.java b/src/helma/framework/repository/ZipRepository.java index 52204486..d5da9ed3 100644 --- a/src/helma/framework/repository/ZipRepository.java +++ b/src/helma/framework/repository/ZipRepository.java @@ -61,7 +61,13 @@ public final class ZipRepository extends AbstractRepository { * @param parent repository */ private ZipRepository(File file, Repository parent, ZipEntry zipentry) { - this.file = file; + // make sure our file has an absolute path, + // see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4117557 + if (file.isAbsolute()) { + this.file = file; + } else { + this.file = file.getAbsoluteFile(); + } this.parent = parent; if (zipentry == null) {