This commit is contained in:
@@ -538,9 +538,8 @@ func IsEncryptedParent(path string) bool {
|
||||
}
|
||||
|
||||
func isEncryptedParentFromComponents(pathComponents []string) bool {
|
||||
if l := len(pathComponents); l > 2 {
|
||||
return false
|
||||
} else if l == 2 && len(pathComponents[1]) != 2 {
|
||||
l := len(pathComponents)
|
||||
if l == 2 && len(pathComponents[1]) != 2 {
|
||||
return false
|
||||
} else if l == 0 {
|
||||
return false
|
||||
@@ -548,5 +547,16 @@ func isEncryptedParentFromComponents(pathComponents []string) bool {
|
||||
if len(pathComponents[0]) == 0 {
|
||||
return false
|
||||
}
|
||||
return pathComponents[0][1:] == encryptedDirExtension
|
||||
if pathComponents[0][1:] != encryptedDirExtension {
|
||||
return false
|
||||
}
|
||||
if l < 2 {
|
||||
return true
|
||||
}
|
||||
for _, comp := range pathComponents[2:] {
|
||||
if len(comp) != maxPathComponent {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user