Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
After upgrading to Big Sur the finder displays additional folders in my ~/Documents folder, which seems to be copies or links to folders of applications in ~/Library/Containers. The folders are only shown in the finder, not in the terminal. The can not be deleted or moved.

Does anybody know, how to get rid of these folders, I do not want my Documents folder to be cluttered by Apple...

Thanks for your help!

Alwis
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
I can't believe, that I am the only one having this problem. Meanwhile I updated all of my Macs who can get Big Sur to 11.0.1 and I have the problem of any one of these Macs.

The finder displays a folder ~/Documents/BBEdit, which is not shown in the terminal or Pathfinder. The contents of this folder is the content of ~/Library/Containers/com.barebones.bbedit/Data/Documents/ and when I delete the Folder in ~/Documents the folder ~/Library/Containers/com.barebones.bbedit/Data/Documents/ is deleted as well.

This clutters my Documents folder and really is annoying.
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
Thanks for pointing me to that thread!

As all other folders within my Documents folder are displayed correctly, I do not think, that the finder shows the wrong folder. And I do not have Documents and Desktop in the cloud (they would not even fit in my 50GB iCloud space...)

I filled a bug with Apple, probably this will be fixed in macOS 94.7...
 

svenmany

macrumors demi-god
Jun 19, 2011
2,275
1,518
You're very welcome and best of luck to you. :)

As an aside, I only suggested recreating the Document favorite since I have no idea how they work. ha! However, you might take a quick look at things by running "sfltool list -d com.apple.LSSharedFileList.FavoriteItems". That just shows the contents of "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl2". You never know, there might be something there that gives you a hint.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,275
1,518
You're very welcome and best of luck to you. :)

As an aside, I only suggested recreating the Document favorite since I have no idea how they work. ha! However, you might take a quick look at things by running "sfltool list -d com.apple.LSSharedFileList.FavoriteItems". That just shows the contents of "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl2". You never know, there might be something there that gives you a hint.
I take it back. That sfltool works differently on Big Sur; it seems it now ignores the -d option. On Catalina it gives the details that you might want to review. That's a shame.
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
Thanks for your help! ButI do not think, that this issue is related to the documents folder in the finder favorite. The problem also occurs when I navigate to the documents folder in the „normal“ file system.
 
  • Like
Reactions: svenmany

netnothing

macrumors 68040
Mar 13, 2007
3,819
422
NH
I have this same issue with BBEdit and iMovie folders appearing in my Documents folder after upgrading to Big Sur. I am able to delete them, however, this seems to be actually deleting whatever folder these links to, as I lose all my prefs for either of those apps.
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
Thats exactly the issue I have. In the meantime I updated my wife's 16“ MacBook Pro to Big Sur and it has the same issue with BBEdit. As this is her first MacBook it has no history of OS updates as my Macs have. So its probably not caused by some strange configuration.
 

gilby101

macrumors 68030
Mar 17, 2010
2,920
1,616
Tasmania
I have this too. Nothing to do with iCloud, favourites, etc. (as far as I can see).

The app folders which appear in ~/Documents duplicate the content in ~/Library/Containers/<app>/Data/Documents

At a quick look, I can't find any ~/Library/Containers/<app>/Data/Documents with files in them which do not appear in ~/Documents.

If I add a file to an empty ~/Library/Containers/<app>/Data/Documents then the <app> suddenly appears in Finder as ~/Documents/<app>

It seems to me that Finder is duplicating ALL such folders whenever they have some content.

Bug or deliberate?

Submitted feedback to Apple: FB8917307
 
Last edited:
  • Like
Reactions: Alwis

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
Might be deliberate, maybe people wondered where sandbox apps would store there data.

But if it is deliberate it is a very poor choice, sorting data by app, especially with apps like a text editor is the worst sorting criteria I can imagine. Even putting all files in one big folder would be better...
 

gilby101

macrumors 68030
Mar 17, 2010
2,920
1,616
Tasmania
Might be deliberate, maybe people wondered where sandbox apps would store there data.

But if it is deliberate it is a very poor choice, sorting data by app, especially with apps like a text editor is the worst sorting criteria I can imagine. Even putting all files in one big folder would be better...
The more I think about it the more sure I am that it deliberate. Makes Finder behave more like Files in iOS.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,275
1,518
There certainly is some relationships between stuff under Containers and stuff under Documents. On my machine I find plenty of symbolic links under Containers that point to locations under Documents. The links also existed in Catalina. But, what I found interesting about the second post you made Alwis was that you see the folder ~/Documents/BBEdit only in Finder; it's not visible in Terminal or Pathfinder. This is a different issue entirely. I don't have anything like that on my machine (I do own Pathfinder).
 

gilby101

macrumors 68030
Mar 17, 2010
2,920
1,616
Tasmania
There certainly is some relationships between stuff under Containers and stuff under Documents. On my machine I find plenty of symbolic links under Containers that point to locations under Documents. The links also existed in Catalina. But, what I found interesting about the second post you made Alwis was that you see the folder ~/Documents/BBEdit only in Finder; it's not visible in Terminal or Pathfinder. This is a different issue entirely. I don't have anything like that on my machine (I do own Pathfinder).
This issue is definitely not symbolic links. It only arises in Finder which for ~/Documents is behaving like Files on iOS.
 

gilby101

macrumors 68030
Mar 17, 2010
2,920
1,616
Tasmania
And another thing..
View the Documents folder from another Mac and the additional (intruding) folders are gone. A bad change made worse by inconsistencies.
 
  • Like
Reactions: Alwis

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
If I add a file to an empty ~/Library/Containers/<app>/Data/Documents then the <app> suddenly appears in Finder as ~/Documents/<app>

Unfortunately it does not work the other way, deleting the contents from one of the "duplicated" folders does not remove the Folder from ~/Documents.


And in addition the finder displays different names for some of the files in

All of the following directories;
~/Library/Containers/com.apple.mail
~/Library/Containers/com.apple.mail.MailQuickLookExtension
~/Library/Containers/com.apple.MailShareExtension
~/Library/Containers/com.apple.share.Mail.compose
~/Library/Containers/com.apple.share.Mail.compose-back-to-sender
~//Library/Containers/com.apple.STMExtension.Mail

are shown simply as "Mail" in the finder, you have to guess which is which. How can someone think, that this is a good idea? Same for reminders and some other directories, maybe this is an localization issue?


Submitted feedback to Apple: FB8917307

I submitted feedback via the product feedback page: https://www.apple.com/feedback/ But where do you get the id and how can I access it?

I guess, this adds to the long list of applications Apple changed so that they are just not usable anymore... And I guess it is documented nowhere.


There certainly is some relationships between stuff under Containers and stuff under Documents. On my machine I find plenty of symbolic links under Containers that point to locations under Documents. The links also existed in Catalina. But, what I found interesting about the second post you made Alwis was that you see the folder ~/Documents/BBEdit only in Finder; it's not visible in Terminal or Pathfinder. This is a different issue entirely. I don't have anything like that on my machine (I do own Pathfinder).

I to have symbolic links within the folders in ~/Library/Containers/, but the do only link to other folders beneath the same root, not to my ~/Documents folder.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,275
1,518
My last, not very helpful, contribution...

If I add a file to an empty ~/Library/Containers/<app>/Data/Documents then the <app> suddenly appears in Finder as ~/Documents/<app>

I wish I could reproduce that; I'd love to see how that's represented in the file system. I think both of you are saying it's not represented by symbolic links from Containers to Documents. Obviously the contents of these two new directories have to stay in sync. I guess Catalina's new firmlinks could be involved. I'm a bit skeptical, but if a firmlink was being used, I think you would see "sunlnk" as a file flag on the linked directories (run "ls -lO" to see the file flag).

Complete guess - I wonder if this automation is handled by containermanagerd, a process I can see in Activity Monitor. I bet Apple doesn't want you to directly manipulate the contents of Containers. It could be that the side effect you're seeing would not happen if an application were directly manipulating it's own container and using an appropriate API call. That's not to say that Apple didn't mess things up during the transition from Catalina to Big Sur, but it could mean you won't get further pollution of the Documents folder moving forward unless an application you're using intends to do it.

And in addition the finder displays different names for some of the files in

All of the following directories;
~/Library/Containers/com.apple.mail
...
are shown simply as "Mail" in the finder, you have to guess which is which.

This a horrific situation that exists in Finder and Pathfinder. You can tell which is which by inspecting the contents of .com.apple.containermanagerd.metadata in each folder. It seems clear that Apple doesn't mean you to be looking in the containers folder. This is unpleasant for the more technical people (you guys). Consider this post.

I to have symbolic links within the folders in ~/Library/Containers/, but the do only link to other folders beneath the same root, not to my ~/Documents folder.

Bizarre. I have so many such links and have had them for a many of previous OS versions. For example, the BBEdit container has many symbolic links to locations outside of Containers: Desktop, Downloads, "Documents/BBEdit backups", many different directories under Library (at various levels). This list goes on and on. The same is true for every other application's container that I checked.

Nothing to do with iCloud, favourites, etc. (as far as I can see).

I respect your intuition. Just be aware that I'm not seeing any of the behavior you guys are seeing and I have my entire Documents and Desktop stored in iCloud. I do have a second computer to upgrade. I hope I see the behavior you're seeing.

The only reason I got side tracked on favorites in Finder is that the initial symptom reported was that a folder was visible in Finder but neither in Terminal nor Pathfinder. That symptom was dropped from all subsequent discussion, so it seems like I was focused on an unimportant part of the issue.

Best of luck getting some resolution on this.
 
  • Like
Reactions: gilby101 and Alwis

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
I'm a bit skeptical, but if a firmlink was being used, I think you would see "sunlnk" as a file flag on the linked directories (run "ls -lO" to see the file flag).

ls or any other application I tested, with the exception of the finder, do not show these directories at all.


It could be that the side effect you're seeing would not happen if an application were directly manipulating it's own container and using an appropriate API call.

It might very well be, that it depends on how the application handles the API. On all of my Macs only three application have this issue: BBEdit, RAW Power and Mac Family Tree 9. But a bug in the transition to BS seems more likely

This a horrific situation that exists in Finder and Pathfinder. You can tell which is which by inspecting the contents of .com.apple.containermanagerd.metadata in each folder. It seems clear that Apple doesn't mean you to be looking in the containers folder. This is unpleasant for the more technical people (you guys). Consider this post.

Thanks for the link! And horrific seems to be the exact description... If apple does not want me to look into these folders, why do they bother showing some custom name for them? Luckily I can find my way in a terminal and have mc and joe installed...

I respect your intuition. Just be aware that I'm not seeing any of the behavior you guys are seeing and I have my entire Documents and Desktop stored in iCloud. I do have a second computer to upgrade. I hope I see the behavior you're seeing.

Its Apple, there might be several similar issues...
 
  • Like
Reactions: gilby101

gilby101

macrumors 68030
Mar 17, 2010
2,920
1,616
Tasmania
Unfortunately it does not work the other way, deleting the contents from one of the "duplicated" folders does not remove the Folder from ~/Documents.
Oh, it does for me with, for example, BBEdit and iThoughtsX.
I submitted feedback via the product feedback page: https://www.apple.com/feedback/ But where do you get the id and how can I access it?
I did feedback via the Feedback Assistant app which I have because I am signed up to some beta programmes (or is it because I am registered as a non-paying Developer?). That gives you an FB number.

My comments on this issue have all been with the release version 11.0.1 though I am seeing the same behaviour with 11.1 beta on a MacBook.
I wish I could reproduce that; I'd love to see how that's represented in the file system. I think both of you are saying it's not represented by symbolic links from Containers to Documents. Obviously the contents of these two new directories have to stay in sync. I guess Catalina's new firmlinks could be involved. I'm a bit skeptical, but if a firmlink was being used, I think you would see "sunlnk" as a file flag on the linked directories (run "ls -lO" to see the file flag).
Reproducability: Looking a bit harder, I have discovered it is only with a few apps. I added a file to ~/Library/Containers/MindNode Pro/Data/Documents and it appears in ~/Documents/MindNode Pro/

My suspicion is that it is not any form of file system link. This is based on the behaviour being restricted to the Finder app.
Complete guess - I wonder if this automation is handled by containermanagerd, a process I can see in Activity Monitor.
Might be a good guess. This is a new daemon - according to the man page it was first introduced with macOS 10.16.
The only reason I got side tracked on favorites in Finder is that the initial symptom reported was that a folder was visible in Finder but neither in Terminal nor Pathfinder. That symptom was dropped from all subsequent discussion, so it seems like I was focused on an unimportant part of the issue.
You weren't sidetracked. You were thinking up possible connections/explanations.
I am seeing the behaviour as in the first post - extra folders in ~Documents when viewed in Finder, .

All I/we really know for certain is that:
1) Finder shows unexpected app related folders in ~/Documents.
2) The unexpected folders are not seen Terminal, PathFinder or ForkLift.
3) The folders show what is in ~/Library/Containers/<app>/Data/Documents for some (a few?) apps.
 
  • Like
Reactions: Alwis

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
I did feedback via the Feedback Assistant app which I have because I am signed up to some beta programmes (or is it because I am registered as a non-paying Developer?). That gives you an FB number.

Thanks, I will try out the Feedback Assistant, am registered as a non-paying Developer too.

Oh, it does for me with, for example, BBEdit and iThoughtsX.

Did you just delete the files or an additional finder, logout or anything else?
 

gilby101

macrumors 68030
Mar 17, 2010
2,920
1,616
Tasmania
Did you just delete the files or an additional finder, logout or anything else?
Sorry, I am not getting consistent results.

I am sure that yesterday I just deleted all the files in ~/Library/Containers/<app>/Data/Documents and the ~/Documents/<app> was gone. Nothing extra (no logout or reboot). Not today the folder stays in ~/Documents/.

But I have rashly tried another delete. I deleted ~/Documents/BBEdit. Lo and behold all of ~/Library/Containers/BBEdit is gone! Not even in Trash. Maybe that was a mistake!

I am moving towards the conclusion that I should remove all my stuff from ~/Documents (put it into ~/MyDocuments) and leave Apple to mess about with ~/Documents. Sad.
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
I am moving towards the conclusion that I should remove all my stuff from ~/Documents (put it into ~/MyDocuments) and leave Apple to mess about with ~/Documents. Sad.

Littering the home directory is one of the (many) things I always hated in Windows and now Apple seems to start the same...

Maybe you are right, but doing this, I would have to wait at least a day until a new TimeMachine Backup is finished and that for every backup target (I have several 100 GB in Documents, mainly because I put my photos in a subfolder)...
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
After updating to 11.2 I am still seeing this problem, probably I am just using my documents folder wrong...
 

Alwis

macrumors 6502
Original poster
Jan 12, 2017
439
506
Finally I stumbled over a workaround an Stackexchange:

Setting the hidden flag will not show the folders below ~/Documents any longer, e.g.:
chflags -R hidden ~/Library/Containers/com.barebones.bbedit/Data/Documents/

Easiest way is to drag the Folder drom ~/Documents to the terminal.
 
  • Like
Reactions: gilby101
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.