Skip to content

Use Google Drive AppData folder instead of cluttering GDrive#9

Open
cfunkhouser wants to merge 2 commits into
asjoyner:masterfrom
cfunkhouser:master
Open

Use Google Drive AppData folder instead of cluttering GDrive#9
cfunkhouser wants to merge 2 commits into
asjoyner:masterfrom
cfunkhouser:master

Conversation

@cfunkhouser

Copy link
Copy Markdown
Contributor

When either FileParentID or ChunkParentID are omitted from a Google Drive configuration, store those files in the hidden app data folder instead. The app data folder is not manageable through the Google Drive web interface (except to wholesale delete all app data), so shade storage will not clutter the Google Drive file manager interface.

If either the ChunkParentID or FileParentID options are not specified, the
files which would have been written to those directories is instead written to
the hidden app data directory. The result is an uncluttered Google Drive file
list. Data stored this way can be wholesale deleted from the "Settings" pane.

@asjoyner asjoyner left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the CL! There's just one regression...

Comment thread drive/google/google.go
q = fmt.Sprintf("%s and ('%s' in parents OR '%s' in parents)", q, s.config.FileParentID, s.config.ChunkParentID)
spaces := "appDataFolder"
if s.config.ChunkParentID != "" {
q = fmt.Sprintf("%s and '%s' in parents", q, s.config.ChunkParentID)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're removing the OR that also looks in s.config.FileParentId. That doesn't work for the non-appDataFolder case, because GetFile calls through to GetChunk, so GetChunk needs to look in both places.

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 this pull request may close these issues.

2 participants