文件301直链与password文件隐藏

This commit is contained in:
微凉
2020-12-28 10:23:54 +08:00
parent 4af469efed
commit bacbf7bc1b
5 changed files with 38 additions and 2 deletions

View File

@@ -106,8 +106,9 @@ type TokenResp struct {
func HasPassword(files *Files) string {
fileList := files.Items
for _, file := range fileList {
for i, file := range fileList {
if strings.HasPrefix(file.Name, ".password-") {
files.Items=fileList[:i+copy(fileList[i:],fileList[i+1:])]
return file.Name[10:]
}
}