mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
servicemenuinstaller: Remove file if it already exists
This is the case when you update an entry.
This commit is contained in:
parent
476fe42624
commit
a4a7b5e8af
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue