Improve atomic delete

skip hidden directories in load task, and return soon if path not exist
in atomicDelete

carry of #3233

Closes #3233

Signed-off-by: Ace-Tang <aceapril@126.com>
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Ace-Tang
2019-04-19 16:49:03 +08:00
committed by Michael Crosby
parent cafda1c50f
commit 5b7a327c47
4 changed files with 14 additions and 0 deletions

View File

@@ -330,6 +330,10 @@ func (r *Runtime) loadTasks(ctx context.Context, ns string) ([]*Task, error) {
continue
}
id := path.Name()
// skip hidden directories
if len(id) > 0 && id[0] == '.' {
continue
}
bundle := loadBundle(
id,
filepath.Join(r.state, ns, id),