mirror of https://github.com/Xhofe/alist
🐛 fix windows check parent
parent
8cfabfd0f5
commit
fe981f67ec
|
@ -49,7 +49,7 @@ func CheckParent(path string, password string) bool {
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
if path == "/" {
|
if path == "/" || path == "\\" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return CheckParent(filepath.Dir(path), password)
|
return CheckParent(filepath.Dir(path), password)
|
||||||
|
@ -72,7 +72,7 @@ func CheckDownLink(path string, passwordMd5 string) bool {
|
||||||
if !conf.CheckParent {
|
if !conf.CheckParent {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if path == "/" {
|
if path == "/" || path == "\\" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return CheckDownLink(filepath.Dir(path), passwordMd5)
|
return CheckDownLink(filepath.Dir(path), passwordMd5)
|
||||||
|
|
Loading…
Reference in New Issue