Opened 12 years ago

Closed 12 years ago

#2943 closed Bug (fixed)

watch.c matches every file containing ".torrent"

Reported by: Longinus00 Owned by: charles
Priority: Low Milestone: 1.91
Component: Daemon Version: 1.90
Severity: Minor Keywords:
Cc:

Description

Currently the gtk client uses g_str_has_suffix instead of strstr to make sure only files ending in .torrent are added.

Attachments (1)

watchtorrent.diff (1.6 KB) - added by Longinus00 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Longinus00

comment:1 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.91
  • Owner set to charles
  • Status changed from new to assigned

comment:2 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

r10249 daemon/watch.c: (trunk daemon) #2943 "watch.c matches everything containing '.torrent'" -- use Longinus00's patch to fix this in trunk for 1.91

comment:3 follow-up: Changed 12 years ago by Longinus00

  • Resolution fixed deleted
  • Status changed from closed to reopened

I made an error in copy pasting, line 185 should be:

if( !str_has_suffix( d->d_name, ".torrent" ) ) /* skip non-torrents */

Sorry!

comment:4 in reply to: ↑ 3 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to Longinus00:

I made an error in copy pasting, line 185 should be:

if( !str_has_suffix( d->d_name, ".torrent" ) ) /* skip non-torrents */

Thanks for the heads-up.

Sorry!

No problem; I should've noticed it too. Actually I'm surprised it compiled. :)

Fixed in trunk for 1.91 by r10251.

Note: See TracTickets for help on using tickets.