mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
fix startup exception on fresh installations
This commit is contained in:
@@ -91,16 +91,26 @@ public class ScmUpgradeHandler
|
||||
File configDirectory = new File(baseDirectory, "config");
|
||||
File versionFile = new File(configDirectory, "version.txt");
|
||||
|
||||
// pre version 1.2
|
||||
if (!versionFile.exists())
|
||||
if (configDirectory.exists())
|
||||
{
|
||||
if (logger.isInfoEnabled())
|
||||
|
||||
// pre version 1.2
|
||||
if (!versionFile.exists())
|
||||
{
|
||||
logger.info("upgrade to version {}",
|
||||
SCMContext.getContext().getVersion());
|
||||
if (logger.isInfoEnabled())
|
||||
{
|
||||
logger.info("upgrade to version {}",
|
||||
SCMContext.getContext().getVersion());
|
||||
}
|
||||
|
||||
fixDate(configDirectory);
|
||||
}
|
||||
|
||||
fixDate(configDirectory);
|
||||
// fresh installation
|
||||
}
|
||||
else
|
||||
{
|
||||
IOUtil.mkdirs(configDirectory);
|
||||
}
|
||||
|
||||
writeVersionFile(versionFile);
|
||||
|
||||
Reference in New Issue
Block a user