[#56440274] Add toPath for Windows compile.