Delete .info files
This commit is contained in:
parent
ba05749dbd
commit
2b29af4547
|
@ -202,15 +202,15 @@ func (s *DataStore) gc() (before int64, after int64, err error) {
|
||||||
deleted[fullPath] = true
|
deleted[fullPath] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we did not delete a .log file but forgot the .bin or vice-versa.
|
// Make sure we did not delete a .info file but forgot the .bin or vice-versa.
|
||||||
for fullPath, _ := range deleted {
|
for fullPath, _ := range deleted {
|
||||||
ext := path.Ext(fullPath)
|
ext := path.Ext(fullPath)
|
||||||
base := fullPath[0 : len(fullPath)-len(ext)]
|
base := fullPath[0 : len(fullPath)-len(ext)]
|
||||||
|
|
||||||
counterPath := ""
|
counterPath := ""
|
||||||
if ext == ".bin" {
|
if ext == ".bin" {
|
||||||
counterPath = base + ".log"
|
counterPath = base + ".info"
|
||||||
} else if ext == ".log" {
|
} else if ext == ".info" {
|
||||||
counterPath = base + ".bin"
|
counterPath = base + ".bin"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue