Skip to content
This repository has been archived by the owner on Jun 11, 2022. It is now read-only.

Commit

Permalink
Fix loading paths with special cheracters on Windows
Browse files Browse the repository at this point in the history
krzysdz committed Apr 9, 2018
1 parent 848fedb commit bafe99d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderer.js
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ function selectFile() {
gameScr.on(elWidth, elHeight);
};
img.src = "file://" + bg[0];
bg[0] = escape(bg[0].replace(/[\\]/g, "/"));
bg[0] = encodeURI(bg[0].replace(/\\/g, "/"));
imgHolder.style.backgroundImage = "url(file://" + bg[0] + ")";
} else {
alert("No file selected");

0 comments on commit bafe99d

Please sign in to comment.