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:
Thomas Goyne 2012-10-19 07:35:37 -07:00
parent 938ccfe39b
commit 8575fb9c87

View file

@ -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;
}