S3 Tables: use os.ModeDir constant in filer_ops.go
- Replace magic number 1<<31 with os.ModeDir for better readability. - Added necessary os import.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
|
||||||
@@ -27,7 +28,7 @@ func (h *S3TablesHandler) createDirectory(ctx context.Context, client filer_pb.S
|
|||||||
Attributes: &filer_pb.FuseAttributes{
|
Attributes: &filer_pb.FuseAttributes{
|
||||||
Mtime: now,
|
Mtime: now,
|
||||||
Crtime: now,
|
Crtime: now,
|
||||||
FileMode: uint32(0755 | 1<<31), // Directory mode
|
FileMode: uint32(0755 | os.ModeDir), // Directory mode
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user