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.
R0ckP1us
Posts: 31
Joined: 26 Mar 2023 09:08
Contact:

Re: bug in Storage

Post by R0ckP1us »

Thanks for this report.I edited and then seems resolved :lol:
Hi~ My E-mail : rockplus@mail.i2p
http://bg3.i2p
Post Reply