Commit a4a7b5e8 authored by Alexander Lohnau's avatar Alexander Lohnau 💬 Committed by Elvis Angelaccio

servicemenuinstaller: Remove file if it already exists

This is the case when you update an entry.
parent 476fe426
......@@ -290,6 +290,9 @@ bool cmdInstall(const QString &archive, QString &errorText)
if (archive.endsWith(QLatin1String(".desktop"))) {
// Append basename to destination directory
const auto dest = QDir(serviceDir).absoluteFilePath(QFileInfo(archive).fileName());
if (QFileInfo::exists(dest)) {
QFile::remove(dest);
}
qInfo() << "Single-File Service-Menu" << archive << dest;
QFile source(archive);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment