support amd_glob with dir