SOLR-4203: dont check if ulog is set to delete tlogs files on startup - check if the tlog dir exists

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1423608 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-18 20:00:15 +00:00
parent 5f502ec003
commit bef4454e2f

View File

@ -85,8 +85,9 @@ public abstract class UpdateHandler implements SolrInfoMBean {
// not thread safe - for startup
private void clearLog(PluginInfo ulogPluginInfo) {
if (ulog != null) {
String[] files = UpdateLog.getLogList(UpdateLog.getTlogDir(ulogPluginInfo));
File tlogDir = UpdateLog.getTlogDir(ulogPluginInfo);
if (tlogDir.exists()) {
String[] files = UpdateLog.getLogList(tlogDir);
for (String file : files) {
File f = new File(file);
boolean s = f.delete();