Revert "SplitRide overwrites existing file"

This reverts commit c3cfccdfb8.

Small risk of data loss, reverting to previous behaviour.
This commit is contained in:
Mark Liversedge
2011-09-07 06:59:53 +01:00
parent bf5353c508
commit a8a91022b8

View File

@@ -163,11 +163,7 @@ SplitRideDialog::CreateNewRideFile(const RideFile *ride, int nRecStart, int nRec
QFile file(filePath);
if (file.exists())
{
QString backupPath = filePath + ".bak";
QMessageBox::warning(this, tr("Split Ride"), tr("The file %1 already exists and will backed up to %2").arg(filePath).arg(backupPath));
QFile(backupPath).remove(); // just wipe away any previously saved backup
file.rename(backupPath);
QMessageBox::critical(this, tr("Split Ride"), tr("The file %1 already exists and will not be overwritten").arg(filePath));
return;
}