I have a raft of similar errors. One in particular is for a folder which contains a hidden folder which contains a broken symlink (to a file in a deleted folder that was adjacent to the hidden folder).
mui mui/node_modules/.bin/loose-envify -> ../loose-envify/cli.js
The folder .bin
is what Insync is complaining about.
I seem to be able to reproduce this situation by making
adjacentFolder/ adjacentFolder/testfile folderToDelete/ folderToDelete/testfile -> ../adjacentFolder/testfile
Then deleting adjacentFolder
locally, then deleting folderToDelete
in Google Drive (where it shows up as empty).
I have several other “Could not delete” errors as well (where the folder in question, or even its parent or grandparent are not on Google Drive), where it also appears that broken symlinks to other paths within my drive are to blame. Probably such symlinks should just be deleted, but I guess you don’t want to make that decision for me. A more helpful error message at least would be nice, though.
My solution at the moment is to use the “Open location” link as a shortcut, open a terminal there, and do
find . -type l -exec sh -c 'for x; do [ -e "$x" ] || rm "$x"; done' _ {} +
(from here) to recursively delete broken symlinks under that directory. Insync is then able to clean them up.
However, there was one case of an alternate situation–an unbroken symlink to another locations within my drive. In fact, it was a symlink to a target outside (~/.pythonpath), which itself was a symlink back to inside. I went ahead and deleted the first link, and Insync resolved it.
The final Action Required was neither of these cases–a normal drwxrwxr-x
folder, with a normal -rw-rw-r--
file in it. Running my symlink clearing one-liner on this folder dos not allow Insync to resolve it on retry.