mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Fix delete ride to remove .notes file
Will also remove the .cpi or .cpx if it is there. It still renames the original to original.bak so it doesn't actually zap the file. Fixes #115.
This commit is contained in:
@@ -1018,6 +1018,15 @@ MainWindow::removeCurrentRide()
|
||||
.arg(strOldFileName).arg(strNewName));
|
||||
}
|
||||
|
||||
// remove any other derived/additional files; notes, cpi etc
|
||||
QStringList extras;
|
||||
extras << "notes" << "cpi" << "cpx";
|
||||
foreach (QString extension, extras) {
|
||||
|
||||
QString deleteMe = QFileInfo(strOldFileName).baseName() + "." + extension;
|
||||
QFile::remove(home.absolutePath() + "/" + deleteMe);
|
||||
}
|
||||
|
||||
// notify AFTER deleted!
|
||||
item->freeMemory();
|
||||
rideDeleted(item);
|
||||
|
||||
Reference in New Issue
Block a user