Skip to content

Commit 4f267e7

Browse files
committed
2 parents 5c3e5d1 + db67b2b commit 4f267e7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

app/release.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,17 @@ void Release::addVariant(Variant *variant) {
7474
}
7575

7676
void Release::setLocalFile(const QUrl &fileUrl) {
77-
const QString filePath = fileUrl.path();
77+
QString filePath = fileUrl.path();
78+
79+
// NOTE: on windows QUrl::path() leaves a leading
80+
// slash like this: "/C:foo/bar", very fun!
81+
#ifdef _WIN32
82+
if (filePath.startsWith("/")) {
83+
filePath.remove(0, 1);
84+
}
85+
#endif // _WIN32
86+
87+
qInfo() << filePath;
7888

7989
// Delete old custom variant (there's really only one, but iterate anyway)
8090
for (auto variant : m_variants) {

0 commit comments

Comments
 (0)