Merge pull request #2784 from Trial97/ensure_desktop

ensure that the shortcut destination exists
This commit is contained in:
Alexandru Ionut Tripon 2024-09-08 08:52:53 +03:00 committed by GitHub
commit 42eedd1afa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -921,6 +921,10 @@ bool createShortcut(QString destination, QString target, QStringList args, QStri
if (destination.isEmpty()) { if (destination.isEmpty()) {
destination = PathCombine(getDesktopDir(), RemoveInvalidFilenameChars(name)); destination = PathCombine(getDesktopDir(), RemoveInvalidFilenameChars(name));
} }
if (!ensureFilePathExists(destination)) {
qWarning() << "Destination path can't be created!";
return false;
}
#if defined(Q_OS_MACOS) #if defined(Q_OS_MACOS)
// Create the Application // Create the Application
QDir applicationDirectory = QDir applicationDirectory =