diff --git a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java index e6ab850..58047d4 100644 --- a/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java +++ b/src/main/java/ch/unibas/dmi/dbis/cs108/casono/client/ui/gameui/gameuicomponents/TaskbarController.java @@ -1944,13 +1944,23 @@ public class TaskbarController { try { Path start = Paths.get(System.getProperty("user.dir")); - Path file = findFileUpAndDown(start, "index.html", "Gruppe-13"); + Path file = start; - if (file == null) { - throw new IllegalStateException("index.html not found"); + while (file != null && !file.getFileName().toString().equals("Gruppe-13")) { + file = file.getParent(); } - CasinoBrowserController.open(file.toUri().toString()); + if (file == null) { + throw new IllegalStateException("Gruppe-13 not found"); + } + + Path target = file.resolve("outreach").resolve("index.html"); + + if (!Files.isRegularFile(target)) { + throw new IllegalStateException("outreach/index.html not found"); + } + + CasinoBrowserController.open(target.toUri().toString()); } catch (Exception e) { e.printStackTrace();