fix(cli): add --overwrite to drive download and slides thumbnail#829
Open
WadydX wants to merge 1 commit into
Open
fix(cli): add --overwrite to drive download and slides thumbnail#829WadydX wants to merge 1 commit into
WadydX wants to merge 1 commit into
Conversation
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
9707b8e to
4c674ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
--overwriteflags todrive downloadandslides thumbnail --out, matching the existing behavior ofphotos download.Closes #827
Problem
drive downloadandslides thumbnail --outsilently overwrite existing local files because they route throughcreateUserOutputFile, which hardcodesOverwrite: true.drive download --tabis also affected because it delegates torunDocsTabExport, which uses the same helper.Changes
internal/cmd/drive_download.goOverwrite booltoDriveDownloadCmdoverwritethroughdownloadDriveFile(...)andrunDocsTabExport(...)createUserOutputFilewithopenUserOutputFile(..., outputFileOptions{Overwrite: ...})internal/cmd/slides_thumbnail.goOverwrite booltoSlidesThumbnailCmdoverwritethroughdownloadSlidesThumbnail(...)createUserOutputFilewithopenUserOutputFile(..., outputFileOptions{Overwrite: ...})internal/cmd/docs_tab_export.goOverwrite booltotabExportParamscreateUserOutputFilewithopenUserOutputFile(..., outputFileOptions{Overwrite: ...})Precedent
photos downloadalready exposes--overwriteand passesOverwrite: c.OverwriteintoopenUserOutputFile.Testing
Static analysis only. No local Go toolchain available to run
make test.