fix bug where a folder is not listed in case it only contains a subfolder and no file