aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/afero/basepath.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2021-02-28 18:08:33 -0500
committerGitHub <noreply@github.com>2021-02-28 18:08:33 -0500
commit47f6a4ec3f058f69b65fb6501d6ac98994b8f8da (patch)
tree4d1421a4c836de9de4014117419c151035c17eec /vendor/github.com/spf13/afero/basepath.go
parent030646eea41e17e58e11e73b19339630b6d6148e (diff)
downloadgitea-47f6a4ec3f058f69b65fb6501d6ac98994b8f8da.tar.gz
gitea-47f6a4ec3f058f69b65fb6501d6ac98994b8f8da.zip
go1.16 (#14783)
Diffstat (limited to 'vendor/github.com/spf13/afero/basepath.go')
-rw-r--r--vendor/github.com/spf13/afero/basepath.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/spf13/afero/basepath.go b/vendor/github.com/spf13/afero/basepath.go
index 3a14b833e4..4f9832829d 100644
--- a/vendor/github.com/spf13/afero/basepath.go
+++ b/vendor/github.com/spf13/afero/basepath.go
@@ -83,6 +83,13 @@ func (b *BasePathFs) Chmod(name string, mode os.FileMode) (err error) {
return b.source.Chmod(name, mode)
}
+func (b *BasePathFs) Chown(name string, uid, gid int) (err error) {
+ if name, err = b.RealPath(name); err != nil {
+ return &os.PathError{Op: "chown", Path: name, Err: err}
+ }
+ return b.source.Chown(name, uid, gid)
+}
+
func (b *BasePathFs) Name() string {
return "BasePathFs"
}
@@ -202,5 +209,3 @@ func (b *BasePathFs) ReadlinkIfPossible(name string) (string, error) {
}
return "", &os.PathError{Op: "readlink", Path: name, Err: ErrNoReadlink}
}
-
-// vim: ts=4 sw=4 noexpandtab nolist syn=go