mirror of
https://github.com/ihmily/DouyinLiveRecorder.git
synced 2025-12-26 05:48:32 +08:00
fix: graceful exit when disk usage threshold is reached (#1239)
This commit is contained in:
parent
271a53621d
commit
abb204e6e9
2
main.py
2
main.py
@ -1932,7 +1932,7 @@ while True:
|
||||
check_path = video_save_path or default_path
|
||||
if utils.check_disk_capacity(check_path, show=first_run) < disk_space_limit:
|
||||
exit_recording = True
|
||||
if not recording:
|
||||
if exit_recording and not recording:
|
||||
logger.warning(f"Disk space remaining is below {disk_space_limit} GB. "
|
||||
f"Exiting program due to the disk space limit being reached.")
|
||||
sys.exit(-1)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user