Skip to content

Commit d04b538

Browse files
authored
Various 8.1.0 fixes (#8495)
2 parents 62ef221 + 3536c98 commit d04b538

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/tribler/core/libtorrent/download_manager/download_manager.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ def create_session(self, hops: int = 0) -> lt.session: # noqa: PLR0915
294294
"allow_i2p_mixed": 1,
295295
"announce_to_all_tiers": int(self.config.get("libtorrent/announce_to_all_tiers")),
296296
"announce_to_all_trackers": int(self.config.get("libtorrent/announce_to_all_trackers")),
297-
"max_concurrent_http_announces": int(self.config.get("libtorrent/max_concurrent_http_announces"))
297+
"max_concurrent_http_announces": int(self.config.get("libtorrent/max_concurrent_http_announces")),
298+
"disk_write_mode": 0 # always_pwrite
298299
}
299300

300301
# Copy construct so we don't modify the default list
@@ -1089,8 +1090,7 @@ def remove_config(self, infohash: bytes) -> None:
10891090
basename = hexlify(infohash).decode() + ".conf"
10901091
filename = self.get_checkpoint_dir() / basename
10911092
self._logger.debug("Removing download checkpoint %s", filename)
1092-
if os.access(filename, os.F_OK):
1093-
os.remove(filename)
1093+
filename.unlink(missing_ok=True)
10941094
except:
10951095
# Show must go on
10961096
self._logger.exception("Could not remove state")

0 commit comments

Comments
 (0)