Skip to content

Conversation

@xrgzs
Copy link
Member

@xrgzs xrgzs commented Nov 13, 2025

Description / 描述

更正链接缓存模式的位运算

Motivation and Context / 背景

Fix https://github.com/OpenListTeam/OpenList/pull/1498/files#r2521239767

Relates to #1498

How Has This Been Tested? / 测试

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
…k checks

Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the bitwise comparison logic for link cache mode flags. The original code incorrectly compared the bitwise AND result against the literal value 1, which would fail for the LinkCacheUA flag (value 2). The fix correctly compares against the actual flag constants.

  • Corrects bitwise AND comparison for LinkCacheIP flag check
  • Corrects bitwise AND comparison for LinkCacheUA flag check

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jyxjjj jyxjjj merged commit 0866b90 into OpenListTeam:main Nov 13, 2025
20 checks passed
@xrgzs xrgzs deleted the fix/link-cache branch November 13, 2025 05:52
@jyxjjj
Copy link
Member

jyxjjj commented Nov 13, 2025

其实一般做位运算都不和其他值对比,而是异或后和期望值对比,问题倒是没问题但是可能难以维护。我先合有问题再说吧。

@wjw479

This comment was marked as spam.

@ILoveScratch2
Copy link
Member

其实一般做位运算都不和其他值对比,而是异或后和期望值对比,问题倒是没问题但是可能难以维护。我先合有问题再说吧。

能不能解决一下上传文件,但是文件列表不刷新的问题啊

请不要提无关问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants