Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(qseow): Fix broken task visualisation on Windows #565

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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