Jump to content

Smarter handling of iCloud application folders


pontus

Recommended Posts

When doing a file search for "documents" I get almost only results like this "iCloud Drive > [app] > Documents" (see picture1). 

It has been like this on both Sierra and High Sierra and several versions of Alfred.

 

The [app]-folder could be both folders I actually see in Finder (picture2) and apps that I only have on my iPhone and doesn't show in Finder. 

 

Unclear to me if it is a problem with Alfred or the macOS index, but very annoying. 

picture1.png

picture2.png

Edited by pontus
hit submit by mistake
Link to comment
Share on other sites

2 hours ago, pontus said:

Unclear to me if it is a problem with Alfred or the macOS index, but very annoying. 

 

It’s not a bug. You have dozens of folders called “Documents”, so sure, that’s what you’ll see when you search for “documents”. (Finder is lying to you about the names of the folders. It does that quite a lot.)

 

What are you actually trying to do?

Link to comment
Share on other sites

  • 2 weeks later...
On 10/13/2017 at 5:20 PM, deanishe said:

What are you actually trying to do?

 

I am trying to open my two Documents folders (one extra in my Dropbox) – and I want them to show up on top of the results since that would be more relevant to me. 

 

On 10/13/2017 at 5:20 PM, deanishe said:

(Finder is lying to you about the names of the folders. It does that quite a lot.)

 

Yes and Alfred app is quite good at handling that so my results still are relevant (and not only correct). But after this change in iCloud the file search have become less usable.

 

The problem as I see it:

1. The default search results shouldn't show content of hidden/system folders.

 

2. It definitely shouldn't show all the contents of the folder ~/Library/Mobile Documents and present them as normal folders with the path iCloud Drive/(iPhone app name)/Documents. That is faulty for two reasons: 

a. The folder can not in any meaningful way be said to be a part of my (the users) files and folders on my computer.

b. macOS prevents me (and Alfred) from open that folder – that is, if I try to open it Finder shows the root folder for iCloud Drive

 

Hence the bug report.

 

PS. @deanishe maybe you should try a bit less defensive strategy when answering on the forum, your reply doesn't exactly make me want to report more bugs.

Link to comment
Share on other sites

This is an interesting conundrum, and something which is going to take a bit of consideration.

 

For file search, Alfred uses the macOS metadata for searching, and as you've seen this is returning the Document folders within the mobile document folders for iCloud Drive. Finder is fudging these to just show the application name: For example, with Sketch:

 

~/Library/Mobile Documents/WUGMZZ5K46~com~bohemiancoding~sketch/Documents

 

... is just showing as Sketch in Finder, even though it's actually Sketch's Documents folder. This is obviously some extra logic within Finder, which is not applied to Spotlight / metadata.

 

I.e. You'll see the same "documents" results within Spotlight as you do within Alfred.

 

Alfred is already doing a better job than Spotlight in this respect, as at a glance, Alfred will show you the source of the document folders within iCloud.

 

Having said that, even though this isn't technically a bug in Alfred, I've added a ticket to look into what I can do to make this more graceful.

 

Cheers,

Andrew

Link to comment
Share on other sites

11 hours ago, pontus said:

maybe you should try a bit less defensive strategy when answering on the forum, your reply doesn't exactly make me want to report more bugs.

 

You're reading far too much into that, tbh.

 

Your first post essentially says, "when I search for 'documents', Alfred shows me all the folders I have called 'documents'. Is this Alfred's fault or macOS's fault?" (None of those folders are hidden or system files—Alfred does not show either in its default results.)

 

11 hours ago, pontus said:

I am trying to open my two Documents folders (one extra in my Dropbox) – and I want them to show up on top of the results since that would be more relevant to me. 

 

All other things being equal, Alfred puts most-recently-used files/folders at the top, so if you have a bunch of similarly-named files/folders, opening the one you want in Finder will usually move it to the top of the list, and then it will stay there, as Alfred remembers which one you selected.

 

So for the time being, open ~/Documents in Finder to move it to the top of the results, then action it a couple of times in Alfred to keep it there.

Edited by deanishe
Add relevant quote to solution to OP's problem
Link to comment
Share on other sites

10 hours ago, Andrew said:

Having said that, even though this isn't technically a bug in Alfred, I've added a ticket to look into what I can do to make this more graceful.

 

Thanks for your answer. I figured the problem was in spotlight rather than Alfred. 

The weirdest part is that they show up but at the same time cannot be opened.

 

I don't use these folders much so I should probably just make Alfred ignore them.

 

Cheers

Pontus

Link to comment
Share on other sites

@pontus I'm going to move this thread to the "Feature Suggestions" forum and rename it to "Smarter handling of iCloud application folders" (I think you can still change the title if you'd like to).

 

As @Andrew confirmed, it's not actually a bug (in the sense that Alfred is behaving as expected, and the "shenanigans" are happening on Finder's side).

 

In addition to my above suggestion of "touching" and actioning the folders you want at the top of your results, you could also try adding the "documents" keyword to the folders you want to see. If that works, it's a lot easier than tagging a whole bunch of folders with alfred:ignore.

 

Edited by deanishe
Link to comment
Share on other sites

  • deanishe changed the title to Smarter handling of iCloud application folders

Hi,

I have now had time to look more into this:

 

On 10/25/2017 at 1:02 PM, Andrew said:

mine open the correct relevant folders

 

This is not at all the case for me:

  • I have actioned almost every single one of the items in Alfred, they all jump to the iCloud "root" folder (iCloud Drive) after Finder first shows my user folder (~/) for about 0,1 seconds.
  • The folders that is shown in Finder on my iCloud Drive doesn't appear in the list in Alfred, so I am not able to try those, eg. Preview (picture attached).

 

On 10/24/2017 at 12:05 PM, Andrew said:

 as you've seen this is returning the Document folders within the mobile document folders for iCloud Drive.

 

That is possibly true but in my case I have no mobile app folders, only desktop app folders (see picture). But in Alfred I cannot see the desktop app folders – only mobile app folders and other "strange" ones.

And regarding the mobile app folders I don't believe the app Monument Valley uses iCloud Drive (there are a lot of other mobile apps showing up as well most of those apps doesn't have the functionality to save any documents, and certainly not syncing them on iCloud Drive).

 

Here are a few examples of "strange" folders:

  • iCloud Drive/US-Canada/Documents
  • iCloud Drive/Documents/Documents
  • iCloud Drive/Spotlight/Documents
  • iCloud Drive/Monument Valley/Documents

 

On 10/24/2017 at 10:51 PM, deanishe said:

move this thread to the "Feature Suggestions"

 

For me, the bug is that when I action a folder in Alfred the folder is not shown in Finder. 

The feature suggestion would be to be able to hide folders that is actioned correctly, but for the user still is "annoying" (but that feature exists already?).

 

On 10/24/2017 at 3:50 PM, deanishe said:

action it a couple of times in Alfred to keep it there

 

That would have been great, the problem is that the "Dropbox/Documents" doesn't even make it to the list in the first place.

 

All the best

Pontus 

 

picture3.png

Link to comment
Share on other sites

Just now, deanishe said:

 

Did you open it in Finder first to make it the most-recently used folder?

Thanks for the tips but no luck.

 

Correction to my last post:

Since it was really strange that I got a different behaviour from you, I turned of some custom file search workflows that I was using, and that did change things.

 

The "strange" folders are now opening in Finder (still empty and irrelevant as described above).

And I am still not sure they should be visible as normal folders:

  • Both spotlight search and finder search does show these folders but handles them differently. Spotlight does the same as Alfred, Finder shows me iCloud Drive.
  • I am not able to navigate in Finder to these folders. I have tried "Go to Folder…" for example with this path ~/Library/Mobile Documents/8Z3V4F58RK~com~ustwo~monumentvalley/Documents
  • Finder is hiding the contents of the "folder" Mobile Documents, see picture. If I double click on the name, Finder shows the iCloud Drive folder. 

picture4.png

Link to comment
Share on other sites

46 minutes ago, pontus said:

Thanks for the tips but no luck.

 

You could try setting the option "Touch folders after opening them" in Alfred Preferences > Features > File Search > Advanced, then open the folder via Alfred's file browser mode (enter ~/Dropbox/Documents in Alfred and hit ↩).

 

1 hour ago, pontus said:

most of those apps doesn't have the functionality to save any documents

 

Sure they do. Monument Valley, for example, needs to store your progress. IIRC, the Documents folder is where every iOS app saves its permanent data (i.e. data that should be included in backups). You're probably not seeing the files on macOS because they're hidden/private files only meant to sync between iOS devices and/or not useable by any other application.

 

39 minutes ago, pontus said:

It seems to have a weird behaviour in general.

 

It might be worth rebuilding your Spotlight index at this point. You could try a few individual folders first by dragging them into Spotlight's Privacy pane and then back out again.

 

Perhaps try your Dropbox and Mobile Documents folders first to see if that helps any.

Link to comment
Share on other sites

3 hours ago, deanishe said:

You're probably not seeing the files on macOS because they're hidden/private files only meant to sync between iOS devices and/or not useable by any other application.

This is exactly the reason I don't want them to show up in Alfred.

 

Btw I understand how mobile apps use iCloud to sync settings, but that's something else from the concept iCloud Drive imho.

Also, when I open the Mobile Documents-folder for eg. Monument Valley it is completely empty, not even any hidden files. So I really hope my progress in the game is saved somewhere else... :) 

 

 

3 hours ago, deanishe said:

You could try a few individual folders first by dragging them into Spotlight's Privacy pane and then back out again.

 

Thanks for the help on this, I will try it out. And a handy tips for the future (the touch setting is already on).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...