mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
sftpd: add support for excluding virtual folders from user quota limit
Fixes #110
This commit is contained in:
@@ -174,6 +174,9 @@ func (fs OsFs) CheckRootPath(username string, uid int, gid int) bool {
|
||||
func (fs OsFs) ScanRootDirContents() (int, int64, error) {
|
||||
numFiles, size, err := fs.getDirSize(fs.rootDir)
|
||||
for _, v := range fs.virtualFolders {
|
||||
if v.ExcludeFromQuota {
|
||||
continue
|
||||
}
|
||||
num, s, err := fs.getDirSize(v.MappedPath)
|
||||
if err != nil {
|
||||
if fs.IsNotExist(err) {
|
||||
|
||||
Reference in New Issue
Block a user