remove call of listRecursively on a file

The call was needed in a very early version.
This commit is contained in:
ahr
2017-12-10 17:55:16 +01:00
parent c4dce942a6
commit 8860a048ff

View File

@@ -20,7 +20,6 @@ import org.lucares.pdb.api.Tags;
import org.lucares.pdb.datastore.Doc;
import org.lucares.pdb.datastore.PdbDB;
import org.lucares.utils.CollectionUtils;
import org.lucares.utils.file.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -105,26 +104,15 @@ public class TagsToFile implements AutoCloseable {
final Tags fileSpecificTags = tagSpecific.getTags();
final List<Path> storageFiles = listFiles(tagSpecific);
for (final Path storageFile : storageFiles) {
final Path storageFile = tagSpecific.getPath();
final PdbFile pdbFile = new PdbFile(storageFile, fileSpecificTags);
result.add(pdbFile);
}
}
return result;
}
private List<Path> listFiles(final TagSpecificBaseDir tagSpecific) {
try {
return FileUtils.listRecursively(tagSpecific.getPath());
} catch (final IOException e) {
throw new ReadException(e);
}
}
private List<TagSpecificBaseDir> getTagSpecificFolders(final String query) {
final List<TagSpecificBaseDir> result = new ArrayList<>();