From 034c971aa4cd37172a47da508e584f6138f26e9b Mon Sep 17 00:00:00 2001 From: gitissuepost Date: Fri, 18 Oct 2024 15:58:40 +0100 Subject: [PATCH] Fix for #3258 - Handle path related issues in Windows (#3560) Edge case scenario converting file name to uri which misses the scheme leading to failure --- .../src/main/java/net/thucydides/model/domain/Story.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serenity-model/src/main/java/net/thucydides/model/domain/Story.java b/serenity-model/src/main/java/net/thucydides/model/domain/Story.java index 98f4b4d2d..947524bd7 100644 --- a/serenity-model/src/main/java/net/thucydides/model/domain/Story.java +++ b/serenity-model/src/main/java/net/thucydides/model/domain/Story.java @@ -99,7 +99,7 @@ private PathElements pathElementsFromDirectoryPath(String path) { Path storyPath = null; try { storyPath = Paths.get(new URI(path)); - } catch (URISyntaxException e) { + } catch (URISyntaxException | IllegalArgumentException e) { storyPath = Paths.get(path); } for (int i = 0; i < storyPath.getNameCount(); i++) {