diff options
| author | Ryan Russell <ryanrussell@users.noreply.github.com> | 2022-09-14 12:11:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-14 10:11:31 -0700 |
| commit | d54eb9966f35f02eb25baecec000ec77c0587049 (patch) | |
| tree | ad384f0aaf4c0b8d26610f952478f37bb27fa54c /weed/filer/filer.go | |
| parent | d734fff322b48485a1eb9461919d549ce65ce167 (diff) | |
| download | seaweedfs-d54eb9966f35f02eb25baecec000ec77c0587049.tar.xz seaweedfs-d54eb9966f35f02eb25baecec000ec77c0587049.zip | |
refactor: `Directory` readability (#3665)
Diffstat (limited to 'weed/filer/filer.go')
| -rw-r--r-- | weed/filer/filer.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/filer.go b/weed/filer/filer.go index ae5bc69bc..07d40acc8 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -178,7 +178,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFr if !skipCreateParentDir { dirParts := strings.Split(string(entry.FullPath), "/") - if err := f.ensureParentDirecotryEntry(ctx, entry, dirParts, len(dirParts)-1, isFromOtherCluster); err != nil { + if err := f.ensureParentDirectoryEntry(ctx, entry, dirParts, len(dirParts)-1, isFromOtherCluster); err != nil { return err } } @@ -209,7 +209,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFr return nil } -func (f *Filer) ensureParentDirecotryEntry(ctx context.Context, entry *Entry, dirParts []string, level int, isFromOtherCluster bool) (err error) { +func (f *Filer) ensureParentDirectoryEntry(ctx context.Context, entry *Entry, dirParts []string, level int, isFromOtherCluster bool) (err error) { if level == 0 { return nil @@ -226,7 +226,7 @@ func (f *Filer) ensureParentDirecotryEntry(ctx context.Context, entry *Entry, di if dirEntry == nil { // ensure parent directory - if err = f.ensureParentDirecotryEntry(ctx, entry, dirParts, level-1, isFromOtherCluster); err != nil { + if err = f.ensureParentDirectoryEntry(ctx, entry, dirParts, level-1, isFromOtherCluster); err != nil { return err } |
