Skip to content

Commit a12c2ab

Browse files
committed
fix mkdirs bug in data-service war
1 parent f532c4a commit a12c2ab

File tree

1 file changed

+9
-0
lines changed
  • data-service/src/main/java/password/pwm/receiver

1 file changed

+9
-0
lines changed

data-service/src/main/java/password/pwm/receiver/Storage.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,15 @@ public void remove( )
216216

217217
static void mkdirs( final File file ) throws IOException
218218
{
219+
if ( file.exists() )
220+
{
221+
if ( file.isDirectory() )
222+
{
223+
return;
224+
}
225+
throw new IOException( "path already exists as file: " + file.getAbsolutePath() );
226+
}
227+
219228
if ( !file.mkdirs() )
220229
{
221230
throw new IOException( "unable to create path " + file.getAbsolutePath() );

0 commit comments

Comments
 (0)