Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

关于为多个文件夹设置密码 #170

Answered by spencerwooo
Cubik65536 asked this question in Q&A
Discussion options

You must be logged in to vote

protectedRoutes 在项目中的 utils/tools.ts 进行匹配的,因此:

  1. 通配符 * 一定是不可以的,因为是根据当前路径来「匹配是否为加密文件夹」并「找到当前加密文件夹的 .password 路径」的,而不是通配符则匹配全部路径;
  2. 直接设置根目录 / 也无法完成你想要的效果,因为是根据 match 到的路径来确定当前文件夹所在的 .password 绝对路径,如果设置为 / 就会默认找到 ~/.password 这一个文件而不是你所要的「每个文件夹的单独 .password 文件」来「独立设置密码」。

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Cubik65536
Comment options

@spencerwooo
Comment options

@Cubik65536
Comment options

Answer selected by spencerwooo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
solved Question in discussion is solved
2 participants