From 61aacb5c1bd3368366484b9e03cf90ccf85f1125 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 14 Nov 2015 17:16:17 +0100 Subject: Run go fmt and go vet --- pathfs_frontend/fs.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'pathfs_frontend/fs.go') diff --git a/pathfs_frontend/fs.go b/pathfs_frontend/fs.go index 9f5b1d6..c0a3a41 100644 --- a/pathfs_frontend/fs.go +++ b/pathfs_frontend/fs.go @@ -90,7 +90,7 @@ func (fs *FS) mangleOpenFlags(flags uint32) (newFlags int, writeOnly bool) { func (fs *FS) Open(path string, flags uint32, context *fuse.Context) (fuseFile nodefs.File, status fuse.Status) { cryptfs.Debug.Printf("Open(%s)\n", path) - if fs.CryptFS.IsFiltered(path){ + if fs.CryptFS.IsFiltered(path) { return nil, fuse.EPERM } iflags, writeOnly := fs.mangleOpenFlags(flags) @@ -103,7 +103,7 @@ func (fs *FS) Open(path string, flags uint32, context *fuse.Context) (fuseFile n } func (fs *FS) Create(path string, flags uint32, mode uint32, context *fuse.Context) (fuseFile nodefs.File, code fuse.Status) { - if fs.CryptFS.IsFiltered(path){ + if fs.CryptFS.IsFiltered(path) { return nil, fuse.EPERM } iflags, writeOnly := fs.mangleOpenFlags(flags) @@ -115,21 +115,21 @@ func (fs *FS) Create(path string, flags uint32, mode uint32, context *fuse.Conte } func (fs *FS) Chmod(path string, mode uint32, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(path){ + if fs.CryptFS.IsFiltered(path) { return fuse.EPERM } return fs.FileSystem.Chmod(fs.EncryptPath(path), mode, context) } func (fs *FS) Chown(path string, uid uint32, gid uint32, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(path){ + if fs.CryptFS.IsFiltered(path) { return fuse.EPERM } return fs.FileSystem.Chown(fs.EncryptPath(path), uid, gid, context) } func (fs *FS) Mknod(name string, mode uint32, dev uint32, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(name){ + if fs.CryptFS.IsFiltered(name) { return fuse.EPERM } return fs.FileSystem.Mknod(fs.EncryptPath(name), mode, dev, context) @@ -141,7 +141,7 @@ func (fs *FS) Truncate(path string, offset uint64, context *fuse.Context) (code } func (fs *FS) Utimens(path string, Atime *time.Time, Mtime *time.Time, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(path){ + if fs.CryptFS.IsFiltered(path) { return fuse.EPERM } return fs.FileSystem.Utimens(fs.EncryptPath(path), Atime, Mtime, context) @@ -161,14 +161,14 @@ func (fs *FS) Readlink(name string, context *fuse.Context) (out string, status f } func (fs *FS) Mkdir(path string, mode uint32, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(path){ + if fs.CryptFS.IsFiltered(path) { return fuse.EPERM } return fs.FileSystem.Mkdir(fs.EncryptPath(path), mode, context) } func (fs *FS) Unlink(name string, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(name){ + if fs.CryptFS.IsFiltered(name) { return fuse.EPERM } cName := fs.EncryptPath(name) @@ -184,7 +184,7 @@ func (fs *FS) Rmdir(name string, context *fuse.Context) (code fuse.Status) { } func (fs *FS) Symlink(pointedTo string, linkName string, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(linkName){ + if fs.CryptFS.IsFiltered(linkName) { return fuse.EPERM } // TODO symlink encryption @@ -193,21 +193,21 @@ func (fs *FS) Symlink(pointedTo string, linkName string, context *fuse.Context) } func (fs *FS) Rename(oldPath string, newPath string, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(newPath){ + if fs.CryptFS.IsFiltered(newPath) { return fuse.EPERM } return fs.FileSystem.Rename(fs.EncryptPath(oldPath), fs.EncryptPath(newPath), context) } func (fs *FS) Link(orig string, newName string, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(newName){ + if fs.CryptFS.IsFiltered(newName) { return fuse.EPERM } return fs.FileSystem.Link(fs.EncryptPath(orig), fs.EncryptPath(newName), context) } func (fs *FS) Access(name string, mode uint32, context *fuse.Context) (code fuse.Status) { - if fs.CryptFS.IsFiltered(name){ + if fs.CryptFS.IsFiltered(name) { return fuse.EPERM } return fs.FileSystem.Access(fs.EncryptPath(name), mode, context) -- cgit v1.2.3