git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276327 13f79535-47bb-0310-9956-ffa450edef68master
@@ -114,7 +114,10 @@ Fixed bugs: | |||||
behaved identically. | behaved identically. | ||||
* <xslt> now sets the context classloader if you've specified a nested | * <xslt> now sets the context classloader if you've specified a nested | ||||
<classpath>. Bugzilla report 24802. | |||||
<classpath>. Bugzilla Report 24802. | |||||
* <zip> and friends would delete the original file when trying to update | |||||
a read-only archive. Bugzilla Report 28419. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -338,6 +338,14 @@ public class Zip extends MatchingTask { | |||||
+ archiveType + " file to create!"); | + archiveType + " file to create!"); | ||||
} | } | ||||
if (zipFile.exists() && !zipFile.isFile()) { | |||||
throw new BuildException(zipFile + " is not a file."); | |||||
} | |||||
if (zipFile.exists() && !zipFile.canWrite()) { | |||||
throw new BuildException(zipFile + " is read-only."); | |||||
} | |||||
// Renamed version of original file, if it exists | // Renamed version of original file, if it exists | ||||
File renamedFile = null; | File renamedFile = null; | ||||
// Whether or not an actual update is required - | // Whether or not an actual update is required - | ||||