mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
NewOsFs: return an interface and not a pointer
This commit is contained in:
@@ -82,7 +82,7 @@ Stream|Baseline MB/s|Devel MB/s|Optimized MB/s|Balanced MB/s|OpenSSH MB/s|
|
|||||||
4|576|836|1080|1099|1569|
|
4|576|836|1080|1099|1569|
|
||||||
8|857|1161|1416|1433|2271|
|
8|857|1161|1416|1433|2271|
|
||||||
|
|
||||||
#### Cipher aes128gcm@openssh.com
|
#### Cipher aes128-gcm@openssh.com
|
||||||
|
|
||||||
With this cipher the messages authentication is implicit, no SHA256 computation is needed.
|
With this cipher the messages authentication is implicit, no SHA256 computation is needed.
|
||||||
|
|
||||||
|
|||||||
@@ -3862,8 +3862,7 @@ func TestResolveVirtualPaths(t *testing.T) {
|
|||||||
MappedPath: mappedPath,
|
MappedPath: mappedPath,
|
||||||
})
|
})
|
||||||
os.MkdirAll(mappedPath, 0777)
|
os.MkdirAll(mappedPath, 0777)
|
||||||
fs := vfs.NewOsFs("", user.GetHomeDir(), user.VirtualFolders)
|
osFs := vfs.NewOsFs("", user.GetHomeDir(), user.VirtualFolders).(vfs.OsFs)
|
||||||
osFs := fs.(*vfs.OsFs)
|
|
||||||
b, f := osFs.GetFsPaths("/vdir/a.txt")
|
b, f := osFs.GetFsPaths("/vdir/a.txt")
|
||||||
if b != mappedPath {
|
if b != mappedPath {
|
||||||
t.Errorf("unexpected base path: %#v expected: %#v", b, mappedPath)
|
t.Errorf("unexpected base path: %#v expected: %#v", b, mappedPath)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ type OsFs struct {
|
|||||||
|
|
||||||
// NewOsFs returns an OsFs object that allows to interact with local Os filesystem
|
// NewOsFs returns an OsFs object that allows to interact with local Os filesystem
|
||||||
func NewOsFs(connectionID, rootDir string, virtualFolders []VirtualFolder) Fs {
|
func NewOsFs(connectionID, rootDir string, virtualFolders []VirtualFolder) Fs {
|
||||||
return &OsFs{
|
return OsFs{
|
||||||
name: osFsName,
|
name: osFsName,
|
||||||
connectionID: connectionID,
|
connectionID: connectionID,
|
||||||
rootDir: rootDir,
|
rootDir: rootDir,
|
||||||
|
|||||||
Reference in New Issue
Block a user