Feature #4977: Fix issue of file rename on Windows