Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got empty folder from shortcut (shortcut's objectID can not using for parentsID) #413

Open
cixxs opened this issue Feb 22, 2022 · 8 comments · May be fixed by #417
Open

Got empty folder from shortcut (shortcut's objectID can not using for parentsID) #413

cixxs opened this issue Feb 22, 2022 · 8 comments · May be fixed by #417

Comments

@cixxs
Copy link

cixxs commented Feb 22, 2022

Hi, there.
I noticed exciting update had supported the shortcut, but unfortunately I got an empty folder from the shortcut.
I have rebuilt the cache bolt and the subfolder which symlinked from shortcut are counted correctly in first caching as well.
Thanks for any help. @RoyXiang

@cixxs
Copy link
Author

cixxs commented Feb 23, 2022

image

After read debug log, I realized that the shortcut's objectID can not using for parentsID. Because of the cache bolt only stored the shortcut symlinked targetfile's objectID.

@cixxs cixxs changed the title Got empty folder from shortcut Got empty folder from shortcut (shortcut's objectID can not using for parentsID) Feb 23, 2022
@xinxin8816
Copy link

Google Drive API not support shortcut objectID as parentsID.
Like you say, such as rclone using shortcut targetID to do that, but not for plexdrive, the cache mechanism may need rewritten I think.

@felixbuenemann
Copy link
Collaborator

Can you try building plexdrive from this branch https://github.com/felixbuenemann/plexdrive/tree/fix-shortcut-dir-listing or use the attached binary and see if it works now?

You mush delete ~/.plexdrive/cache.bolt before starting the new version!

plexdrive-list-shortcut-dir-fix-linux-amd64.zip

Please report if it works correctly with the new version. I did some quick testing and it seems to work for me.

@felixbuenemann
Copy link
Collaborator

Here is a new build that also fixed delete, rename and mkdir in shortcut dirs:

plexdrive-shortcut-dir-fixes-linux-amd64.zip

Please use this build instead for testing.

@cixxs
Copy link
Author

cixxs commented Mar 6, 2022

Here is a new build that also fixed delete, rename and mkdir in shortcut dirs:

plexdrive-shortcut-dir-fixes-linux-amd64.zip

Please use this build instead for testing.

Hi, Felix.
It can list the subfolder in my folder shortcut, but not found files, and this folder shortcut link to a team drive, I have the permission to read definitely.
Looks like only support the shortcut which linked to 'my drive', rather then linked to 'team drive'.

@cixxs
Copy link
Author

cixxs commented Mar 6, 2022

I query a file ObjectID and TargetID in the cache.bolt, which from a 'team drive' had been linked by parent folder shortcut and should be cached, but unfortunately, there found nothing.
Maybe the Google API not responded the result that subfile in the folder shortcut from team drive?

@felixbuenemann
Copy link
Collaborator

I'm not sure shortcut folders to a team drive can work, I only tested with shortcuts to another folder in the same drive. For another team drive the change history that is used to build the cache.bolt would have to include items from the team drive the shortcut points to.

@cixxs
Copy link
Author

cixxs commented Mar 6, 2022

All right, thats the key point, seems google api not responded the change history from another drive that the shortcut points to. So if the shortcut points to the different drive, than we will miss files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants