diff options
| author | chrislu <chris.lu@gmail.com> | 2022-03-16 23:55:31 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-03-16 23:55:31 -0700 |
| commit | 4042fdf3bb5dc9cab2f6df3911819678bbf03e01 (patch) | |
| tree | 4d2e3d4d33eb6a3f5339f8dab9cdc93504da36aa /weed/filer/filer.go | |
| parent | d2acde2a61e659dc91236977d1d36394a56b792f (diff) | |
| download | seaweedfs-4042fdf3bb5dc9cab2f6df3911819678bbf03e01.tar.xz seaweedfs-4042fdf3bb5dc9cab2f6df3911819678bbf03e01.zip | |
rename to skipCheckParentDir
related to https://github.com/chrislusf/seaweedfs/pull/2761
It's better to default to false.
Diffstat (limited to 'weed/filer/filer.go')
| -rw-r--r-- | weed/filer/filer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer/filer.go b/weed/filer/filer.go index 193202889..7b6f1342c 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -151,7 +151,7 @@ func (f *Filer) RollbackTransaction(ctx context.Context) error { return f.Store.RollbackTransaction(ctx) } -func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFromOtherCluster bool, signatures []int32, needEnsureParentDir bool) error { +func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFromOtherCluster bool, signatures []int32, skipCreateParentDir bool) error { if string(entry.FullPath) == "/" { return nil @@ -169,7 +169,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFr if oldEntry == nil { - if needEnsureParentDir { + if !skipCreateParentDir { dirParts := strings.Split(string(entry.FullPath), "/") if err := f.ensureParentDirecotryEntry(ctx, entry, dirParts, len(dirParts)-1, isFromOtherCluster); err != nil { return err |
