mirror of
https://github.com/apache/archiva.git
synced 2025-02-28 13:39:13 +00:00
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 void storeConfiguration( Configuration configuration )
|
||||
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…
x
Reference in New Issue
Block a user