Skip to content

Commit

Permalink
fix file sync
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Dec 14, 2023
1 parent e2c8b68 commit 01ec6c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ RESYNC:
for i, _ := range files {
cr.dlfile(ctx, &stats, &extFileInfo{FileInfo: &files[i], dlerr: nil, trycount: 0})
}
for i := len(stats.slots); i > 0; i-- {
for i := cap(stats.slots); i > 0; i-- {
select {
case stats.slots <- struct{}{}:
case <-ctx.Done():
Expand Down
2 changes: 1 addition & 1 deletion src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ START:
}

func createOssMirrorDir() {
logInfo("Creating %s", ossMirrorDir)
logInfof("Creating %s", ossMirrorDir)
if err := os.MkdirAll(ossMirrorDir, 0755); err != nil && !errors.Is(err, os.ErrExist) {
logErrorf("Cannot create OSS mirror folder %q: %v", ossMirrorDir, err)
os.Exit(2)
Expand Down

0 comments on commit 01ec6c8

Please sign in to comment.