closed #4990. Fix the error when rename file on windows.