Skip to content

Commit

Permalink
fix: Find production bundle theme on Windows (#16942)
Browse files Browse the repository at this point in the history
Classloader always uses a / separated path

Fixes #16941
  • Loading branch information
Artur- authored Jun 1, 2023
1 parent 0e99c17 commit d2c9916
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ public static Optional<JsonObject> getThemeJson(String themeName,
public static URL getThemeResourceFromPrecompiledProductionBundle(
String themeAssetPath) {
// lookup in the prod bundle, where themes are copied from project's
URL resourceUrl = ThemeUtils.class.getClassLoader()
.getResource(Paths.get(VAADIN_WEBAPP_RESOURCES,
VAADIN_STATIC_FILES_PATH, themeAssetPath).toString());
URL resourceUrl = ThemeUtils.class.getClassLoader().getResource(
FrontendUtils.getUnixPath(Paths.get(VAADIN_WEBAPP_RESOURCES,
VAADIN_STATIC_FILES_PATH, themeAssetPath)));
if (resourceUrl == null) {
// lookup in the JARs for packaged themes
resourceUrl = ThemeUtils.class.getClassLoader().getResource(
Expand Down

0 comments on commit d2c9916

Please sign in to comment.