From ada62d1511e6f0a2860b770fe1bc4a9107b9afdf Mon Sep 17 00:00:00 2001 From: sentriz Date: Wed, 3 Jul 2019 11:41:26 +0100 Subject: [PATCH] add some comments to scanner --- scanner/scanner.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scanner/scanner.go b/scanner/scanner.go index 53ae83b..0cd69d4 100644 --- a/scanner/scanner.go +++ b/scanner/scanner.go @@ -210,11 +210,14 @@ func (s *Scanner) callbackItem(fullPath string, info *godirwalk.Dirent) error { } func (s *Scanner) callbackPost(fullPath string, info *godirwalk.Dirent) error { + // begin taking the current folder if the stack and add it's + // parent, cover that we found, etc. folder := s.curFolders.Pop() if folder.ReceivedPaths { folder.ParentID = s.curFolders.PeekID() folder.Cover = s.curCover s.tx.Save(folder) + // we only log changed folders log.Printf("processed folder `%s`\n", path.Join(folder.LeftPath, folder.RightPath)) }