Open
Conversation
klboke
requested changes
Apr 15, 2026
Contributor
klboke
left a comment
There was a problem hiding this comment.
发现两个问题:
-
[中]
server/src/main/java/cn/keking/model/FileType.java:41只把tgz加进了映射表,但文件类型判断仍然只取最后一个后缀(FileType.java:143、server/src/main/java/cn/keking/utils/KkFileUtils.java:166)。这意味着常见的*.tar.gz仍然会被识别成gz并走OTHER分支,用户只有把文件名改成*.tgz才能命中这次新增逻辑。如果目标是支持 gzip 压缩的 tar 包,而不是只支持一个别名后缀,这个实现还不完整。 -
[低] 这次改动改变了
tgz的路由行为,但现有 E2E 仍把“未支持”当成通过条件:tests/e2e/specs/preview-smoke.spec.ts:138允许返回系统暂不支持在线预览。所以即使 PR 合入后sample.tgz仍然落到 fallback 页面,CI 也不会报错。建议把用例收紧到必须成功进入压缩包预览页。
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.
No description provided.