mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
sftpd: add statvfs@openssh.com support
This commit is contained in:
@@ -718,22 +718,16 @@ func (u *User) GetQuotaSummary() string {
|
||||
func (u *User) GetPermissionsAsString() string {
|
||||
result := ""
|
||||
for dir, perms := range u.Permissions {
|
||||
var dirPerms string
|
||||
for _, p := range perms {
|
||||
if len(dirPerms) > 0 {
|
||||
dirPerms += ", "
|
||||
}
|
||||
dirPerms += p
|
||||
}
|
||||
dirPerms := strings.Join(perms, ", ")
|
||||
dp := fmt.Sprintf("%#v: %#v", dir, dirPerms)
|
||||
if dir == "/" {
|
||||
if len(result) > 0 {
|
||||
if result != "" {
|
||||
result = dp + ", " + result
|
||||
} else {
|
||||
result = dp
|
||||
}
|
||||
} else {
|
||||
if len(result) > 0 {
|
||||
if result != "" {
|
||||
result += ", "
|
||||
}
|
||||
result += dp
|
||||
|
||||
Reference in New Issue
Block a user