Skip to content

Commit

Permalink
servicemenuinstaller: Remove file if it already exists
Browse files Browse the repository at this point in the history
This is the case when you update an entry.
  • Loading branch information
alex1701c authored and elvisangelaccio committed Dec 7, 2020
1 parent 476fe42 commit a4a7b5e
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -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);
Expand Down

0 comments on commit a4a7b5e

Please sign in to comment.