Fix #15862 remove dirs in keep list when walk path
Merge pull request #15912 from tankywoo/develop

Fix #15862 remove dirs in keep list when walk path