Skip to content

Commit

Permalink
Fix issue with symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
CarstenHollmann committed Jul 19, 2022
1 parent 228332d commit bf9b034
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.n52.iceland.util;

import java.nio.file.Paths;

import javax.servlet.ServletContext;

/**
Expand All @@ -27,7 +29,8 @@
public class ServletContextPropertyFileHandler extends PropertyFileHandlerImpl {

public ServletContextPropertyFileHandler(ServletContext ctx, String name) {
super(ctx.getRealPath(name));
super(ctx.getRealPath(name) != null ? ctx.getRealPath(name)
: Paths.get(ctx.getRealPath("/"), name).toString());
}

}

0 comments on commit bf9b034

Please sign in to comment.