Удаление пустых папок в data_partial
This commit is contained in:
@@ -265,6 +265,10 @@ def move_scenario_to_data(scenario_id: str) -> None:
|
||||
shutil.move(str(file), str(dst))
|
||||
moved_count += 1
|
||||
|
||||
# Удаляем пустую папку
|
||||
if partial_dir.exists() and not any(partial_dir.iterdir()):
|
||||
partial_dir.rmdir()
|
||||
|
||||
if moved_count > 0:
|
||||
logger.info(f"Сценарий {scenario_id} завершён: перенесено {moved_count} файлов")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user