Skip to content

Conversation

@joaohlisboa
Copy link

Summary

  • Add Shared Drives (Team Drives) support to all file operations
  • Fix bug where download path regex incorrectly stripped directory components

Changes

Shared Drives Support

  • Add supportsAllDrives: true to all file operations (get, create, update, delete, permissions)
  • Add includeItemsFromAllDrives: true to list and search operations
  • Add driveId field to file responses for identifying shared drive files

This enables gdcli to work with files in Shared Drives, not just the user's personal My Drive.

Bug Fix

  • Fix regex /\.[^.]+$//\.[^./]+$/ in download export path handling
  • The old regex matched path separators, causing ~/.gdcli/downloads/file to become ~/.pdf
  • The fix excludes forward slashes from the character class

Test plan

  • Verified build passes (npm run build)
  • Verified type checks pass (npm run check)
  • Tested download command with Google Docs - files now save to correct path

🤖 Generated with Claude Code

joaohlisboa and others added 2 commits December 17, 2025 14:19
- Add `supportsAllDrives: true` to all file operations (get, create, update, delete)
- Add `includeItemsFromAllDrives: true` to list and search operations
- Add `driveId` field to file responses for identifying shared drive files

This enables gdcli to work with files in Shared Drives (Team Drives),
not just the user's personal My Drive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The regex /\.[^.]+$/ was incorrectly matching path separators,
causing paths like ~/.gdcli/downloads/file to become ~/.pdf

Changed to /\.[^./]+$/ to exclude forward slashes from the match,
ensuring only the file extension is replaced.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant