perf: don't open torrent file descriptors with `TR_SYS_FILE_SEQUENTIAL` (#7089)

This commit is contained in:
Yat Ho 2024-10-14 10:56:44 +08:00 committed by GitHub
parent 61ecad4c43
commit c7c8c47850
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ std::optional<tr_sys_file_t> tr_open_files::get(
// open the file
int flags = writable ? (TR_SYS_FILE_WRITE | TR_SYS_FILE_CREATE) : 0;
flags |= TR_SYS_FILE_READ | TR_SYS_FILE_SEQUENTIAL;
flags |= TR_SYS_FILE_READ;
auto const fd = tr_sys_file_open(filename, flags, 0666, &error);
if (!is_open(fd))
{