diff options
| author | Tannin <sherb@gmx.net> | 2015-12-28 14:34:44 +0100 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2015-12-28 14:34:44 +0100 |
| commit | ddf841400ef4da235f11e9b67177a78bb3d519d4 (patch) | |
| tree | 1ae407dbb626ff600e8560996680edb594f89667 /src/transfersavesdialog.cpp | |
| parent | 1bfc91046badb609261c78b4b5e03bba4dcb61bd (diff) | |
| parent | d417229e6bbaaf393d9172b3c46ee36d285f2196 (diff) | |
Merge branch 'new_vfs_library' of https://github.com/TanninOne/modorganizer into new_vfs_library
Diffstat (limited to 'src/transfersavesdialog.cpp')
| -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());
|
