Delete .info files

This commit is contained in:
Felix Geisendörfer 2013-05-08 13:57:33 +02:00
parent ba05749dbd
commit 2b29af4547
1 changed files with 3 additions and 3 deletions

View File

@ -202,15 +202,15 @@ func (s *DataStore) gc() (before int64, after int64, err error) {
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 {
ext := path.Ext(fullPath)
base := fullPath[0 : len(fullPath)-len(ext)]
counterPath := ""
if ext == ".bin" {
counterPath = base + ".log"
} else if ext == ".log" {
counterPath = base + ".info"
} else if ext == ".info" {
counterPath = base + ".bin"
}