我用Directory.Move(string, string)方法将“c:\aa\bb”改名成“c:\aa\bb2”,再用Directory.Delete(string, true)方法删除“c:\aa\bb2”目录,大多数时候都正常,但偶尔有时会出现异常
出现异常时“c:\aa\bb2”目录里只剩下一个“cc”目录,其余的文件和目录都删除完了(“c:\aa\bb\cc”目录里的目录和文件都是符号链接)。想问下是何原因?
系统是WinXP,vs2008,所在分区已经是NTFS格式以下是异常信息:
System.IO.IOException: 参数不正确。在 System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
在 System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
在 System.IO.Directory.Delete(String path, Boolean recursive)