Merge pull request #2645 from koying/fixscanfolder