fix(drivers/189pc): pass pointer to RenameResp in Rename method#2647
Open
Ovear wants to merge 1 commit into
Open
fix(drivers/189pc): pass pointer to RenameResp in Rename method#2647Ovear wants to merge 1 commit into
Ovear wants to merge 1 commit into
Conversation
Rename function passed RenameResp by value instead of pointer, causing the API response to be discarded and producing a zero-value file entry with empty name, zero size, and zero timestamps after rename.
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 / 摘要
修复189pc驱动重命名后,未正确将返回存入变量,导致重命名的项目会变成零值项目,表现为空文件名文件,并持续到下次列表缓存刷新。
网页端API返回该空文件对象类似如下:
{ "1": { "name": "", "size": 0, "is_dir": false, "modified": "0001-01-01T00:00:00Z", "created": "0001-01-01T00:00:00Z", "sign": "__REDACTED__", "thumb": "", "type": 0, "hashinfo": "{\"md5\":\"\"}", "hash_info": { "md5": "" } } }Rename function passed RenameResp by value instead of pointer, causing the API response to be discarded and producing a zero-value file entry with empty name, zero size, and zero timestamps after rename.
/ 此 PR 包含破坏性变更。
/ 此 PR 修改了公开 API、配置、存储格式或迁移行为。
/ 此 PR 需要关联仓库同步修改。
Testing / 测试
go test ./...Checklist / 检查清单
/ 我已阅读 CONTRIBUTING。
/ 我确认此贡献符合仓库许可证、贡献规范和行为准则。
gofmt,go fmt, orprettierwhere applicable./ 我已按适用情况使用
gofmt、go fmt或prettier格式化变更代码。/ 我已在适用情况下请求相关维护者或代码所有者审查。