Skip to content

Commit 90fcb34

Browse files
committed
do not remove info files on cleanup
1 parent f51b2f9 commit 90fcb34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cleandisk.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ func (s *Server) visitFile(path string, f os.FileInfo, err error) error {
7272
s.log.Debugln("File is newer than", ttl)
7373
return nil
7474
}
75-
if filepath.Ext(path) != ".fid" {
76-
s.log.Infoln("extension is not fid:", path, "; removing...")
75+
ext := filepath.Ext(path)
76+
if ext != ".fid" && ext != ".info" {
77+
s.log.Infoln("extension is not \".fid\" or \".info\":", path, "; removing...")
7778
err = os.Remove(path)
7879
if err != nil {
7980
s.log.Errorln("Cannot remove file:", err.Error())

0 commit comments

Comments
 (0)