MichaelYochpaz/iSubRip

[Issue]: Temporary files aren't properly moved between drives

Closed this issue · 2 comments

vevv commented

Confirmations

  • I have checked the issues tab, and couldn't find an existing open issue for the issue I want to report.

OS Type

Linux

Python Version

3.8.9

Package Version

2.4.0

Description

Files aren't properly moved from the temporary directory, if that happens to be in another drive. That's because Path.replace is used which only attempts to rename the file, changing that to shutil.move fixes the issue.

Config

No response

Output Log

isubrip https://itunes.apple.com/ar/movie/id1641189067
Scraping https://itunes.apple.com/ar/movie/id1641189067?l=en
Found movie: Farewell Mr. Haffmann (2021)
Español (Latinoamérica) (es-419) subtitles were successfully downloaded.
Português (Brasil) (pt-BR) subtitles were successfully downloaded.
Error: [Errno 18] Invalid cross-device link: '/dev/shm/isubrip/Farewell.Mr.Haffmann.2021.iT.WEB/Farewell.Mr.Haffmann.2021.iT.WEB.es-419.vtt' -> 'Farewell.Mr.Haffmann.2021.iT.WEB.es-419.vtt'

Hey, thank you for reporting :)
This indeed seems to be the cause for the issue.
I've pushed a fix to the repo, I'll upload a new version release with the fix tomorrow (if there won't appear any additional bugs that might postpone it)

Fixed in v2.4.1