forked from Public-Mirror/Textractor
devtools: fixed failure to remove devtoolscache when closing the browser
This commit is contained in:
parent
1782292662
commit
1e03e69d00
@ -87,7 +87,10 @@ namespace DevTools
|
||||
CloseHandle(processInfo.hProcess);
|
||||
CloseHandle(processInfo.hThread);
|
||||
}
|
||||
try { std::filesystem::remove_all(L"devtoolscache"); } catch (std::filesystem::filesystem_error) {}
|
||||
for (int retry = 0; ++retry < 20; Sleep(100)) {
|
||||
try { std::filesystem::remove_all(L"devtoolscache"); break; }
|
||||
catch (std::filesystem::filesystem_error) { continue; }
|
||||
}
|
||||
OnStatusChanged("Stopped");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user