Hazel Deletes an Empty Folder When I I Don't Want It To

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I have a rule (see image below) that removes certain files from a folder. Hazel keeps deleting the root folder when it's empty. What am I doing wrong? There are no other rules affecting that folder.

https://www.dropbox.com/s/aj3kel2qfon6a2v/2019-07-22%20at%2014.08.03%20%5BDesktop%5D.png?dl=0
iampariah
 
Posts: 37
Joined: Thu May 12, 2016 1:21 pm

Try going through the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

Also, there seems to be a permissions issue with the monitored folder as denoted by the red symbol on the icon. Not sure if that is affecting things as well.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

@Mr_Noodle

I went through the troubleshooting guide and tried a few different tests. I still have the same problem with Hazel deleting the root folder that I want left alone when it's empty. Can you please help me configure my rules to prevent deleting that root folder?

Screenshots of the rules: https://www.dropbox.com/sh/t1unrfh3ldox ... 5OtJa?dl=0
iampariah
 
Posts: 37
Joined: Thu May 12, 2016 1:21 pm

iampariah wrote:@Mr_Noodle

I went through the troubleshooting guide and tried a few different tests. I still have the same problem with Hazel deleting the root folder that I want left alone when it's empty. Can you please help me configure my rules to prevent deleting that root folder?

Screenshots of the rules: https://www.dropbox.com/sh/t1unrfh3ldox ... 5OtJa?dl=0

Add condition for sub-folder depth, only delete if greater than 0.
Dave61
 
Posts: 113
Joined: Tue Jul 10, 2012 4:56 pm

Please post the relevant logs (the troubleshooting guide has more details).
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I seem to have it figured out. I moved the Delete Empty Folders rule above the other two, and that appears to leave the root folder alone.

Screenshot: https://www.dropbox.com/s/uqn1kawnfo2fw ... 2.png?dl=0
iampariah
 
Posts: 37
Joined: Thu May 12, 2016 1:21 pm

Aaand now it's back to deleting the root folder. The behavior of this rule seems to change over time or maybe between updates. Getting logs.
iampariah
 
Posts: 37
Joined: Thu May 12, 2016 1:21 pm

@Mr_Noodle,

Here are the recent lines from the log.

Code: Select all
2019-12-02 15:34:14.972 hazelworker[1013] Processing folder Music
2019-12-02 15:34:16.807 hazelworker[1010] File Killer Dwarfs is busy. Skipping for now.
2019-12-02 15:34:17.089 hazelworker[1013] Done processing folder Music
2019-12-02 15:34:20.128 hazelworker[1014] Running worker (v4.4.2) for folder with identifier: 872415247-562949953426675.
2019-12-02 15:34:20.130 hazelworker[1014] ###main load address: 0x10b4fc000
2019-12-02 15:34:20.130 hazelworker[1014] ###Noodle load address: 0x10b61d000
2019-12-02 15:34:20.130 hazelworker[1014] ###CK load address: 0x10b5e2000
2019-12-02 15:34:20.228 hazelworker[1014] Processing folder Music
2019-12-02 15:34:22.286 hazelworker[1014] Done processing folder Music
2019-12-02 15:34:25.119 hazelworker[1015] Running worker (v4.4.2) for folder with identifier: 872415247-562949953426675.
2019-12-02 15:34:25.121 hazelworker[1015] ###main load address: 0x1042ff000
2019-12-02 15:34:25.121 hazelworker[1015] ###Noodle load address: 0x10441b000
2019-12-02 15:34:25.121 hazelworker[1015] ###CK load address: 0x1043e1000
2019-12-02 15:34:25.184 hazelworker[1015] Processing folder Music
2019-12-02 15:34:27.229 hazelworker[1015] Done processing folder Music
2019-12-02 15:34:27.982 hazelworker[1016] Running worker (v4.4.2) for folder with identifier: 16777225-18737839.
2019-12-02 15:34:27.985 hazelworker[1016] ###main load address: 0x105615000
2019-12-02 15:34:27.985 hazelworker[1016] ###Noodle load address: 0x105733000
2019-12-02 15:34:27.985 hazelworker[1016] ###CK load address: 0x1056f6000


Somewhere in these lines, the folder Hazel is supposed to be evaluating is getting deleted by Hazel.

It appears to processing the parent of the folder I've actually told Hazel to watch. /Music is the parent of /__IN - Music, which Hazel keeps deleting when its empty.

/Killer Dwarfs was a folder (and files) I put inside /__IN - Music for testing (path: smb://talus/M/Music/__IN - Music/Killer Dwarfs ). As soon as the files were removed from /Killer Dwarfs, making it empty, Hazel deleted /Killer Dwarfs and its parent /__IN - Music despite my rule.

Screenshots here: https://www.dropbox.com/sh/38cafnuhvuyf ... jJ78a?dl=0

In Hazel
- "__IN - Music" is the main folder being dealt with (it shows unreachable because Hazel deleted it).

- "Music," the parent of /__IN - Music, has only a single rule, which is to delete Hazel temp folders created when moving files from my Mac running Hazel across to the Windows machine hosting the /__IN - Music folder. (That rule is the "IN - Music" folder in Hazel; when Hazel deletes /__IN - Music, it breaks this other rule because no destination.)[/list]

I just don't get it. Everything I try, including the suggestions in this thread, fail to get Hazel to delete empty subfolders of /__IN - Music without deleting /__IN - Music itself when its empty.
iampariah
 
Posts: 37
Joined: Thu May 12, 2016 1:21 pm

I'm seeing a red badge on that folder that usually indicates there is a permission issue there. You probably want to address that issue first.

As for the parent folder being deleted, that would have be a rule on the folder that contains it. I suggest finding the log excerpt where that is happening and post that (the excerpt you posted does not cover that part).
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

The permission issue is, as I stated above, the folder no longer exists because Hazel deleted it.

I don't understand why it's not reflected in the log, but those are the last actions that Hazel took including deleting the folder. I'm not sure why it's not showing up in the log, but Hazel did delete the folder. No other process is deleting the folder, and I know that because the folder doesn't get deleted if I disable Hazel's rules on that folder. Please help me get hazel to stop deleting that folder.
iampariah
 
Posts: 37
Joined: Thu May 12, 2016 1:21 pm

Hazel will log it if it moves the folder. I suggest trying to trigger it again and then sending the relevant logs. Also, do you see the folders in the trash? If not, then I'm guessing something else might be throwing them away as Hazel does not directly delete things, at least when using the built-in actions.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron