aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/embedthumbnail.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/postprocessor/embedthumbnail.py')
-rw-r--r--yt_dlp/postprocessor/embedthumbnail.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/yt_dlp/postprocessor/embedthumbnail.py b/yt_dlp/postprocessor/embedthumbnail.py
index 7008f4d4d..3139a6338 100644
--- a/yt_dlp/postprocessor/embedthumbnail.py
+++ b/yt_dlp/postprocessor/embedthumbnail.py
@@ -222,8 +222,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor):
raise EmbedThumbnailPPError('Supported filetypes for thumbnail embedding are: mp3, mkv/mka, ogg/opus/flac, m4a/mp4/mov')
if success and temp_filename != filename:
- os.remove(encodeFilename(filename))
- os.rename(encodeFilename(temp_filename), encodeFilename(filename))
+ os.replace(temp_filename, filename)
self.try_utime(filename, mtime, mtime)