diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index 34e3db66b..185484477 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -3,6 +3,7 @@ package storage import ( "fmt" "os" + "runtime" "time" "github.com/chrislusf/seaweedfs/weed/glog" @@ -111,6 +112,10 @@ func (v *Volume) CommitCompact() error { return e } } else { + if runtime.GOOS == "windows" { + os.RemoveAll(v.FileName() + ".dat") + os.RemoveAll(v.FileName() + ".idx") + } var e error if e = os.Rename(v.FileName()+".cpd", v.FileName()+".dat"); e != nil { return fmt.Errorf("rename %s: %v", v.FileName()+".cpd", e)