fedarovich / qbittorrent-net-client

qBittorrent client library for .Net
MIT License
32 stars 14 forks source link

[BUG] Stream from File.OpenRead(path) is never disposed & stays open after addtorrenfilerequest #18

Closed OhMyGuus closed 1 year ago

OhMyGuus commented 1 year ago

At the moment the stream from File.OpenRead is never disposed (after a while gc might closes it but that's unreliable), this will result in an open file handle which prevents users to move/delete or modify torrents files.

https://github.com/fedarovich/qbittorrent-net-client/blob/23be98fa244872a534e8c93cbb3341842709a60f/src/QBittorrent.Client/Extensions/MultipartFormDataContentExtensions.cs#L14