Permalink
Browse files

don't worry about uuid dirs with no subdirs.

  • Loading branch information...
1 parent 25ab23b commit 2525171ae0a36f2284dad3e7f3e7c286d55a139c Robert Newson committed Aug 16, 2011
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/main/java/com/github/rnewson/couchdb/lucene/LuceneServlet.java
@@ -99,12 +99,7 @@ private void cleanup(final HttpServletRequest req,
// Delete all indexes except the keepers.
final File[] dirs = DatabaseIndexer.uuidDir(root, db.getUuid()).listFiles();
- if (dirs == null) {
- LOG.warn(DatabaseIndexer.uuidDir(root, db.getUuid())
- + " is not a directory or could not be read.");
- ServletUtils.sendJsonError(req, resp, 500, "index_dir_perms");
- return;
- } else {
+ if (dirs != null) {
for (final File dir : dirs) {
if (!viewKeep.contains(dir.getName())) {
LOG.info("Cleaning old index at " + dir);

0 comments on commit 2525171

Please sign in to comment.