File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/java/com/gitblit/servlet Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 24
24
import java .text .MessageFormat ;
25
25
import java .util .ArrayList ;
26
26
import java .util .List ;
27
+ import java .util .Set ;
27
28
28
29
import javax .naming .Context ;
29
30
import javax .naming .InitialContext ;
@@ -455,7 +456,12 @@ private File configureExpress(
455
456
}
456
457
457
458
protected void extractResources (ServletContext context , String path , File toDir ) {
458
- for (String resource : context .getResourcePaths (path )) {
459
+ Set <String > resources = context .getResourcePaths (path );
460
+ if (resources == null ) {
461
+ logger .warn ("There are no WAR resources to extract from {}" , path );
462
+ return ;
463
+ }
464
+ for (String resource : resources ) {
459
465
// extract the resource to the directory if it does not exist
460
466
File f = new File (toDir , resource .substring (path .length ()));
461
467
if (!f .exists ()) {
You can’t perform that action at this time.
0 commit comments