change slash format if windows platform
(cherry picked from commit 8095f9c2bf61d505fc35f4d59f968f1a4bcfb394)