Mercurial Hosting > luan
comparison src/luan/modules/IoLuan.java @ 1313:15af473045c4
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 25 Jan 2019 01:30:35 -0700 |
parents | ca742d51b31f |
children | f41919741100 |
comparison
equal
deleted
inserted
replaced
1312:60d013d5c7ef | 1313:15af473045c4 |
---|---|
461 if( file.exists() ) | 461 if( file.exists() ) |
462 delete(file); | 462 delete(file); |
463 } | 463 } |
464 | 464 |
465 private static void delete(File file) throws LuanException { | 465 private static void delete(File file) throws LuanException { |
466 if( !isSymbolicLink(file) ) { | 466 File[] children = file.listFiles(); |
467 File[] children = file.listFiles(); | 467 if( children != null && !isSymbolicLink(file) ) { |
468 if( children != null ) { | 468 for( File child : children ) { |
469 for( File child : children ) { | 469 delete(child); |
470 delete(child); | |
471 } | |
472 } | 470 } |
473 } | 471 } |
474 if( !file.delete() ) | 472 if( !file.delete() ) |
475 throw new LuanException("couldn't delete file "+file); | 473 throw new LuanException("couldn't delete file "+file); |
476 } | 474 } |