make the path compatible with local mode