Skip to content

Commit 2f80e37

Browse files
committed
Use os-related file-seperator in FileProvider
1 parent e8dc4a8 commit 2f80e37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/express/middleware/FileProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import express.utils.Status;
77
import express.utils.Utils;
88

9+
import java.io.File;
910
import java.io.IOException;
1011
import java.nio.file.Files;
1112
import java.nio.file.Path;
@@ -55,7 +56,7 @@ public void handle(Request req, Response res) {
5556
path = "index.html";
5657
}
5758

58-
Path reqFile = Paths.get(root + "\\" + path);
59+
Path reqFile = Paths.get(root + File.separator + path);
5960

6061
/*
6162
* If the file wasn't found, it will search in the target-directory for

0 commit comments

Comments
 (0)