aboutsummaryrefslogtreecommitdiff
path: root/weed/filer2
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-05-21 01:25:30 -0700
committerChris Lu <chris.lu@gmail.com>2018-05-21 01:25:30 -0700
commit9dd228747cd2f6e7f61168e1f394a320bf542623 (patch)
tree9ac2b832099f82310577e494d66991c8d59c177c /weed/filer2
parentf07482382b067b84e917e4d1c3581fe1373957de (diff)
downloadseaweedfs-9dd228747cd2f6e7f61168e1f394a320bf542623.tar.xz
seaweedfs-9dd228747cd2f6e7f61168e1f394a320bf542623.zip
filer copy added uid/gid
Diffstat (limited to 'weed/filer2')
-rw-r--r--weed/filer2/filer.go4
-rw-r--r--weed/filer2/filer_structure.go3
2 files changed, 4 insertions, 3 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go
index fd27760bf..facd447f8 100644
--- a/weed/filer2/filer.go
+++ b/weed/filer2/filer.go
@@ -71,13 +71,13 @@ func (f *Filer) CreateEntry(entry *Entry) (error) {
Attr: Attr{
Mtime: now,
Crtime: now,
- Mode: os.ModeDir | 0660,
+ Mode: os.ModeDir | 0770,
Uid: entry.Uid,
Gid: entry.Gid,
},
}
- glog.V(2).Infof("create directory: %s", dirPath)
+ glog.V(2).Infof("create directory: %s %v", dirPath, dirEntry.Mode)
mkdirErr := f.store.InsertEntry(dirEntry)
if mkdirErr != nil {
return fmt.Errorf("mkdir %s: %v", dirPath, mkdirErr)
diff --git a/weed/filer2/filer_structure.go b/weed/filer2/filer_structure.go
index 51de09718..99ca9ce5a 100644
--- a/weed/filer2/filer_structure.go
+++ b/weed/filer2/filer_structure.go
@@ -6,12 +6,13 @@ import (
"time"
"path/filepath"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
+ "strings"
)
type FullPath string
func NewFullPath(dir, name string) FullPath {
- if dir == "/" {
+ if strings.HasSuffix(dir, "/") {
return FullPath(dir + name)
}
return FullPath(dir + "/" + name)