diff options
| author | TanninOne <seppleviathan@gmx.de> | 2015-12-28 13:50:20 +0100 |
|---|---|---|
| committer | TanninOne <seppleviathan@gmx.de> | 2015-12-28 13:50:20 +0100 |
| commit | 1d1cd36957f27296194a4d66b49d601fdbba0ca2 (patch) | |
| tree | abe182042be1ef1f6c78b5561b054481c555b107 /src | |
| parent | c037b74b00cc3a20938cd3bbfcd01cfde8ca995c (diff) | |
slight fixes to transfer saves functionality
Diffstat (limited to 'src')
| -rw-r--r-- | src/transfersavesdialog.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index f6ca27cd..838d12ce 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -157,7 +157,7 @@ void TransferSavesDialog::on_moveToLocalBtn_clicked() {
QString selectedCharacter = ui->globalCharacterList->currentItem()->text();
if (QMessageBox::question(this, tr("Confirm"),
- tr("Copy all save games of character \"%1\" to the profile?").arg(selectedCharacter),
+ tr("Move all save games of character \"%1\" to the profile?").arg(selectedCharacter),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
QString destination = m_Profile.absolutePath() + "/saves";
OverwriteMode overwriteMode = OVERWRITE_ASK;
@@ -176,10 +176,11 @@ void TransferSavesDialog::on_moveToLocalBtn_clicked() continue;
}
}
- if (!QFile::rename(fileInfo.absoluteFilePath(), destinationFile)) {
- qCritical("failed to move %s to %s",
+ if (!shellMove(fileInfo.absoluteFilePath(), destinationFile)) {
+ qCritical("failed to move %s to %s: %lu",
fileInfo.absoluteFilePath().toUtf8().constData(),
- destinationFile.toUtf8().constData());
+ destinationFile.toUtf8().constData(),
+ ::GetLastError());
}
}
}
@@ -240,7 +241,7 @@ void TransferSavesDialog::on_moveToGlobalBtn_clicked() continue;
}
}
- if (!QFile::rename(fileInfo.absoluteFilePath(), destinationFile)) {
+ if (!shellMove(fileInfo.absoluteFilePath(), destinationFile)) {
qCritical("failed to move %s to %s",
fileInfo.absoluteFilePath().toUtf8().constData(),
destinationFile.toUtf8().constData());
@@ -279,7 +280,7 @@ void TransferSavesDialog::on_copyToGlobalBtn_clicked() continue;
}
}
- if (!QFile::copy(fileInfo.absoluteFilePath(), destinationFile)) {
+ if (!shellCopy(fileInfo.absoluteFilePath(), destinationFile)) {
qCritical("failed to copy %s to %s",
fileInfo.absoluteFilePath().toUtf8().constData(),
destinationFile.toUtf8().constData());
|
