Skip to content

Commit

Permalink
Fix windoze again
Browse files Browse the repository at this point in the history
  • Loading branch information
teamyayc committed Jun 10, 2023
1 parent d33a13a commit 94827cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,8 @@ class RequestInterceptor : public QWebEngineUrlRequestInterceptor
if (newPath.startsWith("file://")) {
newPath = newPath.mid(7);
#if defined(Q_OS_WINDOWS)
newPath = newPath.mid(1); // Strip one more /
if (newPath[0] == '/')
newPath = newPath.mid(1); // Strip one more /
#endif
}

Expand Down
7 changes: 6 additions & 1 deletion main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,12 @@ ApplicationWindow {
}

function deUrlizePath(path) {
return path.slice(7) // strip file://
path = path.slice(7) // strip file://
if (Qt.platform.os === "windows" &&
path[0] === '/') {
path = path.slice(1)
}
return path
}

function isCurrentVideoAdded(key, trigger) {
Expand Down

0 comments on commit 94827cb

Please sign in to comment.