feat(index): support regular expressions for ignored paths#7909
Open
Lanfei wants to merge 1 commit intoAlistGo:mainfrom
Open
feat(index): support regular expressions for ignored paths#7909Lanfei wants to merge 1 commit intoAlistGo:mainfrom
Lanfei wants to merge 1 commit intoAlistGo:mainfrom
Conversation
Contributor
Author
|
Front-end part: AlistGo/alist-web#245 |
xhofe
reviewed
Feb 16, 2025
| for _, avoidPath := range ignorePaths { | ||
| if strings.HasPrefix(indexPath, avoidPath) { | ||
| for _, ignoreReg := range ignoreRegs { | ||
| if ignoreReg.MatchString(indexPath) { |
Collaborator
There was a problem hiding this comment.
感觉这里最好加个正则标识,以不影响之前的设置。
比如以 re_ 开头才当做正则处理
Contributor
Author
There was a problem hiding this comment.
原本的评估是改成正则后原来的路径依然在覆盖范围内,只是相同路径的子目录也会被覆盖进去,感觉影响不是太大,所以没做完全兼容。
如果期望100%跟原来一样的话,加一个『使用正则表达式配置忽略路径』的选项呢?
|
希望该PR能够继续推进,如果有确定方向了也会参与贡献。 |
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.
Support regular expressions for index ignored paths.
索引忽略路径支持正则表达式。