mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
fix potential bugs, detected by findbugs and pmd
This commit is contained in:
@@ -62,9 +62,10 @@ public class ScmLogFilePropertyDefiner extends PropertyDefinerBase
|
||||
File logDirectory = new File(SCMContext.getContext().getBaseDirectory(),
|
||||
LOG_DIRECTORY);
|
||||
|
||||
if (!logDirectory.exists())
|
||||
if (!logDirectory.exists() &&!logDirectory.mkdirs())
|
||||
{
|
||||
logDirectory.mkdirs();
|
||||
throw new ConfigurationException(
|
||||
"could not create log directory ".concat(logDirectory.getPath()));
|
||||
}
|
||||
|
||||
this.logDirectoryPath = logDirectory.getAbsolutePath();
|
||||
|
||||
Reference in New Issue
Block a user