Opened 10 months ago

Last modified 10 months ago

#3629 new bug

Zero-length files not accepted

Reported by: jcdr428 Owned by:
Priority: minor Milestone: needs verified
Component: Core Version: 2.0.5
Keywords: Cc:

Description

When the .torrent includes zero-length files, these files are not included in the files list; the file list is not shown in the UI 'Files' tab; when unchecking files (i.e. file_priorites = 0), the wrong files are downloaded.

Empty files are not forbidden in the bittorrent specs.

Example of non-working .torrent:

d8:announce19:http://announce.com4:infod5:filesld6:lengthi0e4:pathl13:EmptyFile.txteed6:lengthi1000e4:pathl16:NonEmptyFile.txteee4:name11:TorrentFile12:piece lengthi16384e6:pieces20:ABCDEFGHIJKLMNOPQRST7:privatei0e6:source6:sourceee

Change History (1)

comment:1 by jcdr428, 10 months ago

Edit: My hint is this may come from size == 0 (therefore pos >= size) in 'metafile.py' line 353:

        with open(f, 'rb') as file_:
            while pos < size:
Last edited 10 months ago by jcdr428 (previous) (diff)
Note: See TracTickets for help on using tickets.