Error when deleting files

Post your questions and help other users.

Moderator: Martin

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Error when deleting files

Post by vertigo » 27 Jun 2020 20:42

Since I couldn't figure out how AM would handle a flow being stopped in the middle of a file transfer, and therefore couldn't get the file observer trigger to work in a predictable way, I abandoned that approach and changed tactics. I ended up triggering when leaving the camera app, turning off the screen, or taking a screenshot, so if I take a picture then switch away to view it in a photo app, or I turn the screen off, either way I'm not taking pictures anymore, so it's safe to move them. And in the loop for moving the files, after each file, it rechecks to see if the camera is open again, in which case it terminates the flow (well, it only continues if it's not), so the saving of new images won't be bogged down by the I/O of moving the files. Seems to be a good solution. I plan on sharing the flow along with the one I made to trigger syncs with SMBSync2 once I'm fairly convinced there's no more kinks to work out, which will hopefully be soon.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Error when deleting files

Post by Desmanto » 05 Jul 2020 15:37

Maybe AM already have mechanism to stop only the flow once it has finished the running action (of moving the file). But need extra confirmation from Martin to ensure no file corruption.

I haven't get the need to use this file observer frequently. I might do more try and error when needed. So far, I always try to make it manual trigger for file related action.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Error when deleting files

Post by vertigo » 05 Jul 2020 18:29

Yeah. I wonder the same, but wasn't willing to risk it, especially when I came up with an alternate, and I think better, solution. I mainly just wanted others to be able to see it if they happen to be having a similar problem. Nonetheless, it would be great if @Martin could confirm.

Post Reply