From 334095252cdf371ca0c2adf797dc1537c794e692 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 17 Aug 2021 06:52:15 -0500 Subject: [PATCH] copy then delete (fixes #1516) --- frigate/record.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frigate/record.py b/frigate/record.py index f2373abb2..5e51b0ddc 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -111,7 +111,9 @@ class RecordingMaintainer(threading.Thread): file_name = f"{start_time.strftime('%M.%S.mp4')}" file_path = os.path.join(directory, file_name) - shutil.move(cache_path, file_path) + # copy then delete is required when recordings are stored on some network drives + shutil.copyfile(cache_path, file_path) + os.remove(cache_path) rand_id = "".join( random.choices(string.ascii_lowercase + string.digits, k=6)