mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 13:26:58 +03:00
Fix oversights and make requested changes
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
e4991d81d7
commit
3a7366a998
3 changed files with 15 additions and 12 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#include "FileSystem.h"
|
||||
#include "ShaderPackFolderModel.h"
|
||||
|
||||
namespace {
|
||||
|
|
@ -21,21 +22,20 @@ class ShaderPackIndexMigrateTask : public Task {
|
|||
QString src = m_indexDir.filePath(file);
|
||||
QString dest = m_resourceDir.filePath(file);
|
||||
|
||||
if (QFile::rename(src, dest)) {
|
||||
if (FS::move(src, dest)) {
|
||||
qDebug() << "Moved" << src << "to" << dest;
|
||||
} else {
|
||||
movedAll = false;
|
||||
qDebug() << "Error moving" << src << "to" << dest;
|
||||
}
|
||||
}
|
||||
|
||||
if (!movedAll) {
|
||||
// FIXME: not shown in the UI
|
||||
emitFailed(tr("Failed to migrate everything from .index"));
|
||||
emitFailed(tr("Failed to migrate shaderpack metadata from .index"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (FS::deletePath(m_indexDir.absolutePath())) {
|
||||
if (!FS::deletePath(m_indexDir.absolutePath())) {
|
||||
emitFailed(tr("Failed to remove old .index dir"));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue