I'm a programmer diagnosing a customer's issue with our software. We're having some problems writing into the user's
Documents folder in macOS Mojave 10.14.6.*
It turns out that the customer's
~/Documents folder is a symlink to itself, causing
ELOOP errors when calling file APIs, and a
Too many levels of symbolic links error when attempting to view its contents in the Terminal with the
However, in the Finder, the folder displays normally, and appears to contain 15GB of contents.
The first time we saw this issue I wrote it off as an unsolved mystery, but this is the second customer we have seen in the past few years with a Documents folder that is a symbolic link to itself.
So my questions are:
- How is this possible?
- What can cause this configuration? Is there any legitimate reason it might be configured this way?
- Is it safe to tell the user just to move all the contents somewhere safe, delete the folder, and then recreate it in the Finder?
* The path is obtained by passing