chomupashchuk / delete-file-home-assistant

Delete file service for home assistant
MIT License
69 stars 18 forks source link

Recursive delete of multiple directories fails #4

Closed danruck closed 4 years ago

danruck commented 4 years ago

Attempting to delete more than one directory deep fails with 'directory not empty' error.

chomupashchuk commented 4 years ago

can you provide file structure and example of service call?

I do not use cleanup of subfolders in general, I used service once just for test purpose.

danruck commented 4 years ago

Thanks for making this available, it's perfect for handling my cheap camera. It works perfectly with flat files in the root, but one of my cameras creates this:

-Camera --192.168.1.114_001241774294 ---2020-10-08 ----01 -----pic

The service call is:

folder: /media/camera time: 0 scan_subfolders: true remove_subfolders: true

chomupashchuk commented 4 years ago

Removal of subfolders updated