mpegize: force to remove non-empty subdirectories
os.rmdir doesn't remove non-empty directories. m.base/sm subdirectory contains audio-samples, that were not removed after video is created.
This commit is contained in:

committed by
Martijn Braam

parent
978680e5c6
commit
8282b4eaca
@@ -2,6 +2,7 @@
|
||||
# Copyright 2022, 2024 Pavel Machek, GPLv2+
|
||||
|
||||
import os, sys, time, copy, subprocess
|
||||
import shutil
|
||||
import gi
|
||||
gi.require_version('Gst', '1.0')
|
||||
from gi.repository import Gst, GLib
|
||||
@@ -418,8 +419,7 @@ class Mpegize:
|
||||
print("mpegize command base-dir destination-movie fps dng|grw")
|
||||
|
||||
def cleanup(m):
|
||||
os.rmdir(m.base+"/sm/")
|
||||
os.rmdir(m.base)
|
||||
shutil.rmtree(m.base)
|
||||
print("Message: Rec")
|
||||
sys.stdout.flush()
|
||||
|
||||
|
Reference in New Issue
Block a user