Skip to content

Commit

Permalink
fix(qseow): Fix broken task visualisation on Windows
Browse files Browse the repository at this point in the history
Fixes #551
  • Loading branch information
mountaindude committed Nov 28, 2024
1 parent 3b889c7 commit 5d9c9b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,5 @@ sea-prep.blob
.vscode/launch.json
certificate.p12
.vscode/launch.json
ctrl-q.exe
.vscode/launch.json
6 changes: 5 additions & 1 deletion src/lib/cmd/qseow/vistask.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,18 @@ const prepareFile = async (url) => {
logger.verbose(`Paths: ${paths}`);

let filePath = path.join(...paths);
logger.verbose(`Serving file ${filePath}`);
logger.verbose(`Joined path ${filePath}`);

const pathTraversal = !filePath.startsWith(STATIC_PATH);
logger.verbose(`Path traversal: ${pathTraversal}`);

let exists, streamPath, ext, stream;

if (isSea) {
// Change any backslashes to forward slashes, as embedded assets in SEA app are stored with forward slashes
filePath = filePath.replace(/\\/g, '/');
logger.verbose(`Forward slashes path ${filePath}`);

// Prepend with STATIC_PATH
logger.verbose(`url: ${url}`);
logger.verbose(`STATIC_PATH: ${STATIC_PATH}`);
Expand Down

0 comments on commit 5d9c9b4

Please sign in to comment.