From 461abde2e6e3a0ccf4bf4d14f9e8cb575a92c33d Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Fri, 21 Jun 2019 22:09:19 -0700 Subject: [PATCH] Better qDebug messages when rebuilding data --- oscar/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp index a1d5e7ee..dd9cb661 100644 --- a/oscar/mainwindow.cpp +++ b/oscar/mainwindow.cpp @@ -1931,6 +1931,7 @@ void MainWindow::purgeMachine(Machine * mach) mach->day.clear(); QDir dir; QString path = mach->getDataPath(); + qDebug() << "path to machine" << path; path.chop(1); p_profile->DelMachine(mach); @@ -1943,7 +1944,10 @@ void MainWindow::purgeMachine(Machine * mach) SetFileAttributes(directoryPtr, GetFileAttributes(directoryPtr) & ~FILE_ATTRIBUTE_READONLY); if (!::RemoveDirectory(directoryPtr)) { DWORD lastError = ::GetLastError(); - qDebug() << "RemoveDirectory GetLastError: " << lastError; + qDebug() << "RemoveDirectory" << path << "GetLastError: " << lastError << "(Error 145 is expected)"; + if (lastError == 145) { + qDebug() << path << "remaining directory contents are" << QDir(path).entryList(); + } } else { qDebug() << "Success on second attempt deleting folder with windows API " << path;