Skip to content

gog drive search returns folders but not files — gog drive ls works correctly #255

@jarwiscontrolunitsystem

Description

Problem

gog drive search returns folders successfully but doesn't return any files, regardless of query syntax.

Steps to Reproduce

# Works: returns folders
gog drive search "type:folder" --max 10

# Fails: returns "No results" (even though files exist)
gog drive search "mimeType != 'application/vnd.google-apps.folder'" --max 10
gog drive search "mimeType = 'application/vnd.google-apps.document'" --max 10

# Workaround: gog drive ls works correctly
gog drive ls --parent <folder-id> --max 10
# → Returns both folders AND files ✅

Expected Behavior

gog drive search should return files when the query matches files.

Actual Behavior

gog drive search always returns "No results" for file queries, even when files exist in Drive.

Environment

  • gog version: v0.9.0 (99d9575)
  • macOS (Darwin 25.2.0 arm64)
  • OAuth scopes: drive, docs, calendar, gmail, sheets, contacts
  • Auth method: File keyring backend (GOG_KEYRING_BACKEND=file)

Workaround

Use gog drive ls --parent <folder-id> instead of gog drive search.

Additional Context

  • gog docs cat <doc-id> works correctly for accessing files directly by ID
  • gog drive ls correctly lists both folders and files
  • The Drive API OAuth scope is correctly configured (full drive access)

Thanks for the excellent tool! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions