mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 05:16:59 +03:00
match disabled mods on uninstall
fixes #4537 This ensures that when looking to uninstall a resource prism will consider the disabled ones to. Right now we have a guard in place to prevent resources using the same name so this check will allways match with the correct resouce. Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
d3f59a8a43
commit
08c45684de
1 changed files with 7 additions and 1 deletions
|
|
@ -207,7 +207,13 @@ void ResourceFolderModel::installResourceWithFlameMetadata(QString path, ModPlat
|
|||
bool ResourceFolderModel::uninstallResource(const QString& file_name, bool preserve_metadata)
|
||||
{
|
||||
for (auto& resource : m_resources) {
|
||||
if (resource->fileinfo().fileName() == file_name) {
|
||||
auto resourceFileInfo = resource->fileinfo();
|
||||
auto resourceFileName = resource->fileinfo().fileName();
|
||||
if (!resource->enabled() && resourceFileName.endsWith(".disabled")) {
|
||||
resourceFileName.chop(9);
|
||||
}
|
||||
|
||||
if (resourceFileName == file_name) {
|
||||
auto res = resource->destroy(indexDir(), preserve_metadata, false);
|
||||
|
||||
update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue