Skip to content

Commit df97757

Browse files
committed
Fix resource handler for windows.
1 parent c24ac15 commit df97757

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎build.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ allprojects {
2121

2222
// Using Jitpack so I need the repo name in the group to match.
2323
group = 'com.stubbornjava.StubbornJava'
24-
version = '0.1.22-SNAPSHOT'
24+
version = '0.1.23-SNAPSHOT'
2525

2626
repositories {
2727
mavenLocal()

‎stubbornjava-common/src/main/java/com/stubbornjava/common/undertow/handlers/CustomHandlers.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
import java.io.File;
5+
import java.nio.file.Paths;
56
import java.util.SortedMap;
67
import java.util.concurrent.TimeUnit;
78

@@ -57,7 +58,7 @@ public static HttpHandler gzip(HttpHandler next) {
5758
public static HttpHandler resource(String prefix) {
5859
ResourceManager resourceManager = null;
5960
if (Env.LOCAL == Env.get()) {
60-
String path = AssetsConfig.assetsRoot() + "/" + prefix;
61+
String path = Paths.get(AssetsConfig.assetsRoot(), prefix).toString();
6162
log.debug("using local file resource manager {}", path);
6263
resourceManager = new FileResourceManager(new File(path), 1024 * 1024);
6364
} else {

0 commit comments

Comments
 (0)