From f4fac0b3c3fbfd3c4c84c39db3b8a1b97e7cc17b Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Sat, 26 Mar 2016 11:32:31 -0300 Subject: [PATCH] Fixed removal of planned workouts Rename failed due to wrong directory --- src/Core/RideCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/RideCache.cpp b/src/Core/RideCache.cpp index 227c335fb..ea59ebebb 100644 --- a/src/Core/RideCache.cpp +++ b/src/Core/RideCache.cpp @@ -308,7 +308,7 @@ RideCache::removeCurrentRide() // delete the file by renaming it QString strOldFileName = context->ride->fileName; - QFile file(directory.canonicalPath() + "/" + strOldFileName); + QFile file((context->ride->planned ? plannedDirectory : directory).canonicalPath() + "/" + strOldFileName); // purposefully don't remove the old ext so the user wouldn't have to figure out what the old file type was QString strNewName = strOldFileName + ".bak";