Skip to content

Commit 6a21367

Browse files
committed
fix: error in local file path detection
1 parent ee6d014 commit 6a21367

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/edu/kit/datamanager/ro_crate/util/FileSystemUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ private FileSystemUtil() {
2121
* @return true if it looks like a file path, false otherwise
2222
*/
2323
public static boolean isFilePath(String id) {
24-
return !(
25-
id.startsWith("doi:") &&
26-
id.startsWith("http") &&
27-
id.startsWith("https")
24+
return id != null && !(
25+
id.startsWith("doi:") ||
26+
id.startsWith("http://") ||
27+
id.startsWith("https://")
2828
);
2929
}
3030

0 commit comments

Comments
 (0)