mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
Turns out if the config is reloaed from the disk before it's saved, the primaryView field is left non-null and we won't create the All view.
See the post from Xavier in http://www.nabble.com/all-view-disappeared-tt21380658.html git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14323 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
20c13b724e
commit
c63ce3f610
1 file changed
+8
-1
@@ -291,6 +291,9 @@ public final class Hudson extends AbstractModelObject implements ItemGroup<TopLe
|
||||
|
||||
/**
|
||||
* Name of the primary view.
|
||||
* <p>
|
||||
* Start with null, so that we can upgrade pre-1.269 data well.
|
||||
* @since 1.269
|
||||
*/
|
||||
private volatile String primaryView;
|
||||
|
||||
@@ -1609,8 +1612,12 @@ public final class Hudson extends AbstractModelObject implements ItemGroup<TopLe
|
||||
private synchronized void load() throws IOException {
|
||||
long startTime = System.currentTimeMillis();
|
||||
XmlFile cfg = getConfigFile();
|
||||
if(cfg.exists())
|
||||
if(cfg.exists()) {
|
||||
// reset some data that may not exit in the disk file
|
||||
// so that we can take a proper compensation action later.
|
||||
primaryView = null;
|
||||
cfg.unmarshal(this);
|
||||
}
|
||||
|
||||
File projectsDir = new File(root,"jobs");
|
||||
if(!projectsDir.isDirectory() && !projectsDir.mkdirs()) {
|
||||
|
||||
Reference in new issue
Block a user