From 47a1e6ddfab445ca63d1be0214434df03b300cc0 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 21 Sep 2022 08:25:44 +0200 Subject: [PATCH] avoid windows funk --- copyparty/th_srv.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index 75d9051f..b82fa838 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -274,6 +274,12 @@ class ThumbSrv(object): if getattr(ex, "returncode", 0) != 321: with open(tpath, "wb") as _: pass + else: + # ffmpeg may spawn empty files on windows + try: + os.unlink(tpath) + except: + pass with self.mutex: subs = self.busy[tpath]