Skip to content

fix(cli): add --overwrite to drive download and slides thumbnail#829

Open
WadydX wants to merge 1 commit into
openclaw:mainfrom
WadydX:fix/drive-slides-overwrite-flag
Open

fix(cli): add --overwrite to drive download and slides thumbnail#829
WadydX wants to merge 1 commit into
openclaw:mainfrom
WadydX:fix/drive-slides-overwrite-flag

Conversation

@WadydX

@WadydX WadydX commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds --overwrite flags to drive download and slides thumbnail --out, matching the existing behavior of photos download.

Closes #827

Problem

drive download and slides thumbnail --out silently overwrite existing local files because they route through createUserOutputFile, which hardcodes Overwrite: true.

drive download --tab is also affected because it delegates to runDocsTabExport, which uses the same helper.

Changes

  • internal/cmd/drive_download.go

    • Add Overwrite bool to DriveDownloadCmd
    • Thread overwrite through downloadDriveFile(...) and runDocsTabExport(...)
    • Replace createUserOutputFile with openUserOutputFile(..., outputFileOptions{Overwrite: ...})
  • internal/cmd/slides_thumbnail.go

    • Add Overwrite bool to SlidesThumbnailCmd
    • Thread overwrite through downloadSlidesThumbnail(...)
    • Replace createUserOutputFile with openUserOutputFile(..., outputFileOptions{Overwrite: ...})
  • internal/cmd/docs_tab_export.go

    • Add Overwrite bool to tabExportParams
    • Replace createUserOutputFile with openUserOutputFile(..., outputFileOptions{Overwrite: ...})

Precedent

photos download already exposes --overwrite and passes Overwrite: c.Overwrite into openUserOutputFile.

Testing

Static analysis only. No local Go toolchain available to run make test.

Adds --overwrite flags to drive download and slides thumbnail --out,
matching the existing photos download behavior. Also covers drive
download --tab via the shared docs tab export path.

Closes openclaw#827
@WadydX WadydX force-pushed the fix/drive-slides-overwrite-flag branch from 9707b8e to 4c674ce Compare June 16, 2026 13:00
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.

drive download and slides thumbnail overwrite existing output files without opt-in

1 participant