Bug 60351 - WAR unpacking creates META-INF/war-tracker file too early after each unpacked file
Summary: WAR unpacking creates META-INF/war-tracker file too early after each unpacked...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.x-trunk
Hardware: PC All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-08 08:49 UTC by Harri Pesonen
Modified: 2016-11-08 09:54 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harri Pesonen 2016-11-08 08:49:45 UTC
WAR unpacking creates META-INF/war-tracker file too early after each unpacked file. Noticed this when Tomcat was killed while it was unpacking files. It happily used the partially extracted files, and of course the application did not work anymore.

https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/startup/ExpandWar.java

Here you can see that warTracker file is created inside the unpacking loop, right after each file:

                // Create the warTracker file and align the last modified time
                // with the last modified time of the WAR
                warTracker.createNewFile();
                warTracker.setLastModified(warLastModified);
            }
            success = true;
Comment 1 Mark Thomas 2016-11-08 09:54:56 UTC
Thanks for the report. This has been fixed in:
9.0.x for 9.0.0.M14 onwards
8.5.x for 8.5.9 onwards
8.0.x for 8.0.40 onwards
7.0.x and earlier is not affeted