rakshasa / libtorrent

libTorrent BitTorrent library
http://rtorrent.net/downloads/
GNU General Public License v2.0
883 stars 210 forks source link

Fix for inotify missing quickly renamed files (rakshasa/rtorrent #936) #203

Closed obi1 closed 4 years ago

obi1 commented 4 years ago

If a browser uses temporary files in the same folder as destination a inotify event occurs for the temporary file and is added by libtorrent before the rename happens. In this case when removing the torrent the file associated with it did not exist anymore. Sometimes the rename happened just before libtorrent wanted to add the temporary file. In that case the torrent was not added to downloads. This fix tells libtorrent to just add files ending in .torrent. Maybe a better fix would be to add a rename handler.