hugo/0001-Bump-afero-to-1.5.1.patch

61 lines
1.8 KiB
Diff
Raw Normal View History

From 5b6b022c98db95a97ee9c6b30ecd69c8ac4c18a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Mon, 18 Jan 2021 02:35:33 +0100
Subject: [PATCH 1/1] Bump afero to 1.5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
hugofs/filter_fs.go | 4 ++++
hugofs/noop_fs.go | 4 ++++
hugofs/slice_fs.go | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/hugofs/filter_fs.go b/hugofs/filter_fs.go
index 279a2831..bee4d05d 100644
--- a/hugofs/filter_fs.go
+++ b/hugofs/filter_fs.go
@@ -137,6 +137,10 @@ func (fs *FilterFs) Chtimes(n string, a, m time.Time) error {
return syscall.EPERM
}
+func (fs *FilterFs) Chown(n string, uid, gid int) error {
+ return syscall.EPERM
+}
+
func (fs *FilterFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
fi, b, err := lstatIfPossible(fs.fs, name)
if err != nil {
diff --git a/hugofs/noop_fs.go b/hugofs/noop_fs.go
index c3d2f2da..12b4e937 100644
--- a/hugofs/noop_fs.go
+++ b/hugofs/noop_fs.go
@@ -80,3 +80,7 @@ func (fs noOpFs) Chmod(name string, mode os.FileMode) error {
func (fs noOpFs) Chtimes(name string, atime time.Time, mtime time.Time) error {
return errNoOp
}
+
+func (fs *noOpFs) Chown(name string, uid int, gid int) error {
+ return errNoOp
+}
diff --git a/hugofs/slice_fs.go b/hugofs/slice_fs.go
index f1682c1b..fd442ee8 100644
--- a/hugofs/slice_fs.go
+++ b/hugofs/slice_fs.go
@@ -60,6 +60,10 @@ func (fs *SliceFs) Chtimes(n string, a, m time.Time) error {
return syscall.EPERM
}
+func (fs *SliceFs) Chown(n string, uid, gid int) error {
+ return syscall.EPERM
+}
+
func (fs *SliceFs) LstatIfPossible(name string) (os.FileInfo, bool, error) {
fi, _, err := fs.pickFirst(name)
if err != nil {
--
2.29.2