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.0] FileExistsError: '<hash>.torrent.corrupt' #6238

Closed
kozlovsky opened this issue Aug 9, 2021 · 2 comments · Fixed by #6401
Closed

[7.10.0] FileExistsError: '<hash>.torrent.corrupt' #6238

kozlovsky opened this issue Aug 9, 2021 · 2 comments · Fixed by #6401
Assignees

Comments

@kozlovsky
Copy link
Contributor

The bug appeared in 7.8.0, but is should be actual for the current version 7.10.0 as well

Here:

class WatchFolder(TaskManager):
    ...
    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"))

We need to check if renamed file already exists, and probably remove it before renaming

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

Sentry issue: TRIBLER-73

@sentry-for-tribler
Copy link

Sentry issue: TRIBLER-LEGACY-BM

@drew2a drew2a self-assigned this Oct 1, 2021
drew2a added a commit to drew2a/tribler that referenced this issue Oct 1, 2021
@drew2a drew2a mentioned this issue Oct 1, 2021
drew2a added a commit to drew2a/tribler that referenced this issue Oct 4, 2021
drew2a added a commit that referenced this issue Oct 4, 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