| Issue 424: | init truncates bin/gerrit.war if run from bin/gerrit.war | |
| Back to list |
What steps will reproduce the problem? 1. Copy new version to $site_path/bin/gerrit.war 2. Run bin/gerrit.war init -d $site_path 3. Answer "Y" to copy the WAR file on top of itself. The file is truncated to 0 bytes, and a subsequent restart of the server will fail. If the file we are copying from is the file we are going to copy into, we shouldn't do the copy at all. Better, we should use JGit's LockFile class to perform the update of the WAR, because it won't truncate the destination. Instead it writes to a temporary file, and then renames that on top of the destination if the copy is fully successful.
Feb 1, 2010
#1
sop@google.com
Feb 2, 2010
(No comment was entered for this change.)
Owner:
nsallemb...@google.com
Feb 2, 2010
WAR ovewrite fixed in I32945d4a738ae832850e05d732181d914e2127a7
Status:
Fixed
Labels: -Milestone-2.1.2 FixedIn-2.1.2
Oct 21, 2012
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |