mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 16:40:07 +02:00
wxRmDir() diagnostics
Logs files remaining, if wxRmDir() failed in our function, RecursivelyRemove.
This commit is contained in:
parent
62cfeea4a6
commit
04c3a7c13d
@ -303,7 +303,21 @@ static void RecursivelyRemove(wxArrayString& filePathArray, int count, int bias,
|
|||||||
if (!bFiles)
|
if (!bFiles)
|
||||||
::wxRemoveFile(file); // See note above about wxRmdir sometimes incorrectly failing on Windows.
|
::wxRemoveFile(file); // See note above about wxRmdir sometimes incorrectly failing on Windows.
|
||||||
#endif
|
#endif
|
||||||
::wxRmdir(file);
|
|
||||||
|
if (! ::wxRmdir(file) ) {
|
||||||
|
wxDir dir(file);
|
||||||
|
if(dir.IsOpened()) {
|
||||||
|
wxLogMessage(file + wxString(" still contains:"));
|
||||||
|
wxString name;
|
||||||
|
auto cont = dir.GetFirst(&name);
|
||||||
|
while ( cont ) {
|
||||||
|
wxLogMessage(file + wxString(wxFILE_SEP_PATH) + name );
|
||||||
|
cont = dir.GetNext(&name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
wxLogMessage(wxString("Can't enumerate directory ") + file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (progress)
|
if (progress)
|
||||||
progress->Update(i + bias, count);
|
progress->Update(i + bias, count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user