add some comments to scanner
This commit is contained in:
@@ -210,11 +210,14 @@ func (s *Scanner) callbackItem(fullPath string, info *godirwalk.Dirent) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Scanner) callbackPost(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()
|
folder := s.curFolders.Pop()
|
||||||
if folder.ReceivedPaths {
|
if folder.ReceivedPaths {
|
||||||
folder.ParentID = s.curFolders.PeekID()
|
folder.ParentID = s.curFolders.PeekID()
|
||||||
folder.Cover = s.curCover
|
folder.Cover = s.curCover
|
||||||
s.tx.Save(folder)
|
s.tx.Save(folder)
|
||||||
|
// we only log changed folders
|
||||||
log.Printf("processed folder `%s`\n",
|
log.Printf("processed folder `%s`\n",
|
||||||
path.Join(folder.LeftPath, folder.RightPath))
|
path.Join(folder.LeftPath, folder.RightPath))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user