mirror of https://github.com/apache/archiva.git
Fix NPE when file is a root file
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@497811 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db42cac593
commit
7de944c47c
|
@ -158,7 +158,11 @@ public class DefaultConfigurationStore
|
|||
FileWriter fileWriter = null;
|
||||
try
|
||||
{
|
||||
file.getParentFile().mkdirs();
|
||||
//does file directory exist ?
|
||||
if ( file.getParentFile() != null && !file.getParentFile().exists() )
|
||||
{
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
|
||||
fileWriter = new FileWriter( file );
|
||||
writer.write( fileWriter, configuration );
|
||||
|
|
Loading…
Reference in New Issue