Merge pull request #578 from Blu3train/devtools_fixed_failure_remove_devtoolscache
devtools: fixed failure to remove devtoolscache when closing the program
This commit is contained in:
commit
de3cad37f8
@ -149,6 +149,12 @@ namespace DevTools
|
||||
CloseHandle(processInfo.hProcess);
|
||||
CloseHandle(processInfo.hThread);
|
||||
}
|
||||
for (int retry = 0; ++retry < 20; Sleep(100))
|
||||
{
|
||||
try { std::filesystem::remove_all(L"devtoolscache"); break; }
|
||||
catch (std::filesystem::filesystem_error) { continue; }
|
||||
}
|
||||
OnStatusChanged("Stopped");
|
||||
try { std::filesystem::remove_all(L"devtoolscache"); } catch (std::filesystem::filesystem_error) {}
|
||||
StatusChanged("Stopped");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user