Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.10] PermissionError while renaming foobar.torrent to foobar.torrent.corrupt #6299

Closed
kozlovsky opened this issue Aug 30, 2021 · 1 comment · Fixed by #6380
Closed

[7.10] PermissionError while renaming foobar.torrent to foobar.torrent.corrupt #6299

kozlovsky opened this issue Aug 30, 2021 · 1 comment · Fixed by #6380
Assignees

Comments

@kozlovsky
Copy link
Contributor

tribler_core\modules\watch_folder.py:36

    def cleanup_torrent_file(self, root, name):
        fullpath = root / name
        if not fullpath.exists():
            self._logger.warning("File with path %s does not exist (anymore)", root / name)
            return

        fullpath.rename(Path(str(fullpath)+".corrupt"))
Traceback (most recent call last):, 
  File "lib\asyncio\events.py", line 81, in _run, 
  File "ipv8\taskmanager.py", line 131, in done_cb, 
  File "ipv8\taskmanager.py", line 18, in interval_runner, 
  File "ipv8\util.py", line 35, in call_async, 
  File "src\tribler-core\tribler_core\modules\watch_folder.py", line 59, in check_watch_folder, 
  File "src\tribler-core\tribler_core\modules\watch_folder.py", line 36, in cleanup_torrent_file, 
  File "lib\pathlib.py", line 1358, in rename, 
PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: '<...>.torrent' -> '<...>.torrent.corrupt'

Probably we need to handle this situation gracefully

@kozlovsky kozlovsky added this to the 7.11.0 September milestone Aug 30, 2021
@sentry-for-tribler
Copy link

Sentry issue: TRIBLER-7K

@kozlovsky kozlovsky changed the title PermissionError while renaming foobar.torrent to foobar.torrent.corrupt [7.10] PermissionError while renaming foobar.torrent to foobar.torrent.corrupt Aug 30, 2021
@drew2a drew2a self-assigned this Sep 27, 2021
drew2a added a commit to drew2a/tribler that referenced this issue Sep 28, 2021
@drew2a drew2a mentioned this issue Sep 28, 2021
drew2a added a commit that referenced this issue Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants