mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-17 23:59:44 +00:00
Fix get dir perm error (#761)
Co-authored-by: Heran Yang <heran.yang@seafile.com>
This commit is contained in:
@@ -326,7 +326,9 @@ func getSharedDirsToUser(originRepoID string, toEmail string) (map[string]string
|
||||
func getDirPerm(perms map[string]string, path string) string {
|
||||
tmp := path
|
||||
var perm string
|
||||
for tmp != "" {
|
||||
// If the path is empty, filepath.Dir returns ".". If the path consists entirely of separators,
|
||||
// filepath.Dir returns a single separator.
|
||||
for tmp != "/" && tmp != "." && tmp != "" {
|
||||
if perm, exists := perms[tmp]; exists {
|
||||
return perm
|
||||
}
|
||||
|
Reference in New Issue
Block a user