forked from mia/Aegisub
Don't use wxRemoveFile in the cache cleaner
wxRemoveFile notifies the user of errors via a dialog box, and errors when cleaning the cache are normally just due to two copies of Aegisub trying to clean it at the same time.
This commit is contained in:
parent
938ccfe39b
commit
8575fb9c87
1 changed files with 6 additions and 1 deletions
|
@ -378,7 +378,12 @@ class cache_cleaner : public wxThread {
|
|||
break;
|
||||
|
||||
int64_t fsize = i->second.GetSize().GetValue();
|
||||
if (!wxRemoveFile(i->second.GetFullPath())) {
|
||||
#ifdef __WXMSW__
|
||||
int res = wxRemove(i->second.GetFullPath());
|
||||
#else
|
||||
int res = unlink(i->second.GetFullPath().fn_str());
|
||||
#endif
|
||||
if (res) {
|
||||
LOG_D("utils/clean_cache") << "failed to remove file " << STD_STR(i->second.GetFullPath());
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue