add a File interface so we can avoid to use os.File directly

This commit is contained in:
Nicola Murino
2020-11-17 19:36:39 +01:00
parent 969b38586e
commit ca0ff0d630
17 changed files with 63 additions and 47 deletions

View File

@@ -806,7 +806,7 @@ func TestRenamePermission(t *testing.T) {
}
info, err = os.Lstat(tmpDirLink)
if assert.NoError(t, err) {
assert.True(t, info.Mode()&os.ModeSymlink == os.ModeSymlink)
assert.True(t, info.Mode()&os.ModeSymlink != 0)
// the source is a symlink and the target has createDirs and upload perm
assert.False(t, conn.isRenamePermitted(tmpDir, request.Filepath, request.Target, info))
}