Skip to content

Commit

Permalink
Kit: Normalize qtFolder path
Browse files Browse the repository at this point in the history
vscode allows using slashes in paths on Windows. In that situation,
`qtFolder` should be normalized while generating kit names. Otherwise,
kit names have additional `Qt-C` prefix.

Change-Id: I6b4dc953dffac2bc0d1779c6bfdb12edf8efb556
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
  • Loading branch information
OrkunTokdemir committed Aug 16, 2024
1 parent 73bc231 commit 30f9151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qt-official/src/util/get-qt-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export function mangleQtInstallation(
qtFolder: string,
installation: string
): string {
installation = installation.replace(qtFolder, '');
const pathParts = installation.split(/[/\\:]+/).filter((n) => n);
installation = path.relative(qtFolder, installation);
const pathParts = installation.split(path.sep).filter(String);
pathParts.unshift(path.basename(qtFolder));
return pathParts.slice().join('-');
}
Expand Down

0 comments on commit 30f9151

Please sign in to comment.