Skip to content

Commit b429fca

Browse files
committed
Delete lost+find. Fixes #46
1 parent 7f67c24 commit b429fca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmd/mysql-helper/appclone/appclone.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ func RunCloneCommand(stopCh <-chan struct{}) error {
4545
}
4646
}
4747

48+
if err := deleteLostFound(); err != nil {
49+
return fmt.Errorf("removing lost+found: %s", err)
50+
}
51+
4852
if tb.NodeRole() == "master" {
4953
initBucket := tb.GetInitBucket()
5054
if len(initBucket) == 0 {
@@ -221,3 +225,8 @@ func checkIfDataExists() bool {
221225

222226
return true
223227
}
228+
229+
func deleteLostFound() error {
230+
path := fmt.Sprintf("%s/lost+found", tb.DataDir)
231+
return os.RemoveAll(path)
232+
}

0 commit comments

Comments
 (0)