NewOsFs: return an interface and not a pointer

This commit is contained in:
Nicola Murino
2020-05-02 15:01:56 +02:00
parent 3f75d46a16
commit b006c5f914
3 changed files with 3 additions and 4 deletions

View File

@@ -3862,8 +3862,7 @@ func TestResolveVirtualPaths(t *testing.T) {
MappedPath: mappedPath,
})
os.MkdirAll(mappedPath, 0777)
fs := vfs.NewOsFs("", user.GetHomeDir(), user.VirtualFolders)
osFs := fs.(*vfs.OsFs)
osFs := vfs.NewOsFs("", user.GetHomeDir(), user.VirtualFolders).(vfs.OsFs)
b, f := osFs.GetFsPaths("/vdir/a.txt")
if b != mappedPath {
t.Errorf("unexpected base path: %#v expected: %#v", b, mappedPath)