File tree 1 file changed +6
-4
lines changed
src/main/java/org/polypheny/control/control
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -652,15 +652,17 @@ private static void buildPdb( final ClientCommunicationStream clientCommunicatio
652
652
if ( configuration .getString ( "pcrtl.plugins.purge" ).equals ( "afterBuilding" ) ) {
653
653
File pluginsFolder = new File ( configuration .getString ( "pcrtl.pdbms.pluginsdir" ) );
654
654
if ( pluginsFolder .exists () ) {
655
- if ( !pluginsFolder .delete () ) {
655
+ try {
656
+ FileUtils .deleteDirectory ( pluginsFolder );
657
+ if ( clientCommunicationStream != null ) {
658
+ clientCommunicationStream .send ( "> Purged Polypheny plugins folder!" );
659
+ }
660
+ } catch ( IOException e ) {
656
661
if ( clientCommunicationStream != null ) {
657
662
clientCommunicationStream .send ( "> Unable to purge folder!" );
658
663
}
659
664
throw new RuntimeException ( "Unable to purge folder!" );
660
665
}
661
- if ( clientCommunicationStream != null ) {
662
- clientCommunicationStream .send ( "> Purged Polypheny plugins folder!" );
663
- }
664
666
}
665
667
}
666
668
}
You can’t perform that action at this time.
0 commit comments