issue #5804: fix the bug of empty folder not being copied in plugin-x