Skip to content

Commit

Permalink
do not clean symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Jul 21, 2019
1 parent 1e8951b commit 9e60671
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cleandisk.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func (s *Server) visitFile(path string, f os.FileInfo, err error) error {
if f.IsDir() {
return nil
}
if f.Mode()&os.ModeSymlink == os.ModeSymlink {
return nil
}
ttl := time.Duration(s.config.Server.CleanDiskFileTTL)
if time.Since(f.ModTime()) < ttl {
s.log.Debugln("File is newer than", ttl)
Expand Down

0 comments on commit 9e60671

Please sign in to comment.