Jump to content
deanishe

Handling of "syncfolder" preference when sync folder doesn't exist

Recommended Posts

Alfred 3.5.1

 

Just handled an issue with my Fixum workflow whereby syncfolder is set in com.runningwithcrayons.Alfred-Preferences-3.plist, but not actually used because the folder doesn't exist (Alfred Preferences says "not synced").


The issue with Alfred is that if the folder set in the preferences property list is recreated, instead of moving the existing Alfred.alfredpreferences bundle over from ~/Library/Application Support/... as Alfred does when you first set a sync folder via Alfred Preferences > Advanced, Alfred creates an empty Alfred.alfredpreferences bundle in the syncfolder instead.


From my poking Alfred with a stick in the course of fixing the bug in the workflow, it appears that if Alfred removed the syncfolder key from the preferences file if the corresponding directory doesn't exist, all would be well.

Share this post


Link to post
Share on other sites

@deanishe sorry about the slow reply on this, I've been mulling it over for a while.

 

It's a very unusual and unexpected situation to have the syncfolder variable set but for Alfred not to be using this sync folder (because the folder tree doesn't exist).

 

There are a few reasons Alfred doesn't reset the syncfolder at the point the [folder tree to the] Alfred preferences don't exist (e.g. temporarily unavailability of external drive), and when this does happen, the behaviour is likely quirky anyway. It's hard to say how many people may be affected by me changing this behaviour, and removing syncfolder pref if the tree doesn't exist.

 

I'll continue to mull :)

Share this post


Link to post
Share on other sites
1 hour ago, Andrew said:

It's a very unusual and unexpected situation to have the syncfolder variable set but for Alfred not to be using this sync folder

 

I would imagine this is generally a result of a user turning syncing off. There's no button to do it in Alfred, so you'd most likely manually relocate Alfred.alfredpreferences back to ~/Library and then delete the now-empty "Alfred" folder in Dropbox/wherever (from the logs I've seen, almost everybody gives Alfred its own folder in their Dropbox).

 

1 hour ago, Andrew said:

removing syncfolder pref if the tree doesn't exist.

 

Yeah, it makes sense not to do that. It's that silent creation of a new, empty Alfred.alfredpreferences bundle that I see as potentially problematic.

 

Still, if nobody has had this issue in the 4+ years Alfred has behaved this way, I guess it's not actually a real problem.

Share this post


Link to post
Share on other sites

×