mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-05-06 18:19:33 +00:00
Fix Mkdir undo operation fail to remove directory in Settings operation
Related to 0a842140f5d7cc7383c5266acbbc74428dd82014. MkdirOperation object instantiated in SettingsOperation::undoOperation() doesn't have reference to PackageManagerCore instance. As such, replacing @RELOCATABLE_PATH@ with targetDir value can't be done and the created settings file path, being invalid, doesn't get removed. Pass reference of the package manager core which the Settings operation belongs to, to MkdirOperation object, so @RELOCATABLE_PATH@ will be replaced with core's targetDir value. Task-number: QTIFW-1365 Change-Id: I327d8a63320ecec0e1d51fe7ed899d236fbd21e2 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Katja Marttila <katja.marttila@qt.io>
This commit is contained in:
parent
6d5c3d36ea
commit
864aaa7ea3
@ -180,7 +180,7 @@ bool SettingsOperation::undoOperation()
|
||||
if (!settingsFile.remove())
|
||||
qWarning().noquote() << settingsFile.errorString();
|
||||
if (!value(QLatin1String("createddir")).toString().isEmpty()) {
|
||||
KDUpdater::MkdirOperation mkDirOperation;
|
||||
KDUpdater::MkdirOperation mkDirOperation(packageManager());
|
||||
mkDirOperation.setArguments(QStringList() << QFileInfo(path).absolutePath());
|
||||
mkDirOperation.setValue(QLatin1String("createddir"), value(QLatin1String("createddir")));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user