bug in Storage

Issues and ideas about I2PSnark
Post Reply
Zaalar
Posts: 1
Joined: 26 Oct 2023 19:39

bug in Storage

Post by Zaalar »

Hi,
there is a bug in i2psnark:

Storage.createFileFromNames
around line 927

wrong:
private File createFileFromNames(File base, final List<String> names, final boolean areFilesPublic) throws IOException {
File f = null;
final var it = names.iterator();
-> if (it.hasNext()) {
final var name = optFilterName(it.next());
if (it.hasNext()) {
correct:
private File createFileFromNames(File base, final List<String> names, final boolean areFilesPublic) throws IOException {
File f = null;
final var it = names.iterator();
-> WHILE (it.hasNext()) {
final var name = optFilterName(it.next());
if (it.hasNext()) {

When there are subdirs, checking of torrents will loop endlessly.
Post Reply