remove call of listRecursively on a file
The call was needed in a very early version.
This commit is contained in:
@@ -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);
|
||||
|
||||
final PdbFile pdbFile = new PdbFile(storageFile, fileSpecificTags);
|
||||
|
||||
result.add(pdbFile);
|
||||
}
|
||||
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<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user