mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
S3: add support for serving virtual folders
inside the same bucket each user can be assigned to a virtual folder. This is similar to a chroot directory for local filesystem
This commit is contained in:
@@ -180,8 +180,8 @@ func (OsFs) GetAtomicUploadPath(name string) string {
|
||||
|
||||
// GetRelativePath returns the path for a file relative to the user's home dir.
|
||||
// This is the path as seen by SFTP users
|
||||
func (OsFs) GetRelativePath(name, rootPath string) string {
|
||||
rel, err := filepath.Rel(rootPath, filepath.Clean(name))
|
||||
func (fs OsFs) GetRelativePath(name string) string {
|
||||
rel, err := filepath.Rel(fs.rootDir, filepath.Clean(name))
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user