aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth_ldap.go2
-rw-r--r--s3_fs.go12
2 files changed, 12 insertions, 2 deletions
diff --git a/auth_ldap.go b/auth_ldap.go
index 9164e93..bf2a9fb 100644
--- a/auth_ldap.go
+++ b/auth_ldap.go
@@ -101,7 +101,7 @@ func (l *ldapConnector) profile() (*ldap.Entry, error) {
}
if len(sr.Entries) != 1 {
- return nil, errors.New(fmt.Sprintf("Wrong number of LDAP entries, expected 1, got", len(sr.Entries)))
+ return nil, errors.New(fmt.Sprintf("Wrong number of LDAP entries, expected 1, got %d", len(sr.Entries)))
}
return sr.Entries[0], nil
diff --git a/s3_fs.go b/s3_fs.go
index ecade9f..923240e 100644
--- a/s3_fs.go
+++ b/s3_fs.go
@@ -3,7 +3,10 @@ package main
import (
"context"
"errors"
+ "io"
"os"
+ "path"
+ "strings"
"time"
"github.com/minio/minio-go/v7"
@@ -30,7 +33,14 @@ func NewS3FS(mc *minio.Client) S3FS {
func (s S3FS) Mkdir(ctx context.Context, name string, perm os.FileMode) error {
s.ctx = ctx
- return errors.New("Not implemented Mkdir")
+ f, err := NewS3File(&s, path.Join(name, ".bagage"))
+ if err != nil {
+ return err
+ }
+ defer f.Close()
+
+ _, err = io.Copy(f, strings.NewReader("This is a placeholder"))
+ return nil
}
func (s S3FS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error) {