Windows: moving a file that was previously mapped in memory fails

前端 未结 2 1134
长情又很酷
长情又很酷 2020-12-22 02:45

-:= EDITED TO SIMPLIFY =:-


I am facing an issue in the process of porting code from a Linux (Ubuntu LTS 12.4) environment to Windows Server 2008.

I n

2条回答
  •  心在旅途
    2020-12-22 03:16

    The error message says it all. Windows can't delete or rename an open file like any Unix can, and you're opening workFile and then immediately trying to rename it. You'll have to close the stream first.

提交回复
热议问题