Hide debug logs for now

This commit is contained in:
Quentin 2021-08-20 17:51:16 +02:00
parent be17ee5a40
commit 5d64be33e6

10
main.go
View file

@ -173,7 +173,7 @@ func (s *GarageFS) Mkdir(ctx context.Context, name string, perm os.FileMode) err
} }
func (s *GarageFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error) { func (s *GarageFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error) {
log.Println("Stat from GarageFS.OpenFile()", name) //log.Println("Stat from GarageFS.OpenFile()", name)
NewGarageStatFromFile(ctx, name) NewGarageStatFromFile(ctx, name)
return NewGarageFile(ctx, name) return NewGarageFile(ctx, name)
} }
@ -187,7 +187,7 @@ func (s *GarageFS) Rename(ctx context.Context, oldName, newName string) error {
} }
func (s *GarageFS) Stat(ctx context.Context, name string) (os.FileInfo, error) { func (s *GarageFS) Stat(ctx context.Context, name string) (os.FileInfo, error) {
log.Println("Stat from GarageFS.Stat()", name) //log.Println("Stat from GarageFS.Stat()", name)
return NewGarageStat(ctx, name) return NewGarageStat(ctx, name)
} }
@ -322,7 +322,7 @@ func (gf *GarageFile) readDirRoot(count int) ([]fs.FileInfo, error) {
entries := make([]fs.FileInfo, 0, len(buckets)) entries := make([]fs.FileInfo, 0, len(buckets))
for _, bucket := range buckets { for _, bucket := range buckets {
log.Println("Stat from GarageFile.readDirRoot()", "/"+bucket.Name) //log.Println("Stat from GarageFile.readDirRoot()", "/"+bucket.Name)
ngf, err := NewGarageStat(gf.ctx, "/"+bucket.Name) ngf, err := NewGarageStat(gf.ctx, "/"+bucket.Name)
if err != nil { if err != nil {
return nil, err return nil, err
@ -349,7 +349,7 @@ func (gf *GarageFile) readDirChild(count int) ([]fs.FileInfo, error) {
if object.Err != nil { if object.Err != nil {
return nil, object.Err return nil, object.Err
} }
log.Println("Stat from GarageFile.readDirChild()", path.Join("/", gf.path.bucket, object.Key)) //log.Println("Stat from GarageFile.readDirChild()", path.Join("/", gf.path.bucket, object.Key))
ngf, err := NewGarageStatFromObjectInfo(gf.ctx, gf.path.bucket, object) ngf, err := NewGarageStatFromObjectInfo(gf.ctx, gf.path.bucket, object)
if err != nil { if err != nil {
return nil, err return nil, err
@ -361,7 +361,7 @@ func (gf *GarageFile) readDirChild(count int) ([]fs.FileInfo, error) {
} }
func (gf *GarageFile) Stat() (fs.FileInfo, error) { func (gf *GarageFile) Stat() (fs.FileInfo, error) {
log.Println("Stat from GarageFile.Stat()", gf.path.path) //log.Println("Stat from GarageFile.Stat()", gf.path.path)
return NewGarageStatFromFile(gf.ctx, gf.path.path) return NewGarageStatFromFile(gf.ctx, gf.path.path)
} }