Suppose I have the following folder structure in MyDrive:
(A)
FolderA\FolderB
FolderC
I give permission to the user email@gmail.com to FolderA and FolderC.
When I give permission to the user email@gmail.com to FolderA it will be also cascaded to FolderB by Google design. The user email@gmail.com will see only FolderA and FolderC in his Shared with me folder. He will see FolderB when he'll go inside FolderA. The user sees in his Shared with me folder the following folders structure:
FolderA
FolderC
Now, if I remove email@gmail.com from FolderB and then share FolderB again with email@gmail.com he will now see in his Shared with me the following folders structure:
(B)
FolderA
FolderB
FolderC
How I can detect those orphans like FolderB with Google Drive SDK?