Skip to content

Commit d8efa32

Browse files
authored
Fix NullPointerException (#45)
1 parent b16967c commit d8efa32

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/utils/PathUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public static String extractBasePath(String fullPath) {
4848
* @return the file URI
4949
*/
5050
public static String toFileUri(String filePath) {
51+
if (filePath == null) return "";
52+
5153
String normalized = filePath.replace("\\", "/");
5254
// Windows (C:/path)
5355
if (!normalized.isEmpty() && normalized.charAt(1) == ':') {

0 commit comments

Comments
 (0)