on-internet
← Community

"IOException: There is not enough space on the disk." while there is enough space

Stack Overflow ·

I made sequence of operations (on local disk): Copy file to ###.bak Save file to ### Delete file ###.bak Code: File.Copy(filename, filename + ".bak"); TextWriter writer = new StreamWriter(filename); writer.Write(content); writer.Close(); File.Delete(filename + ".bak"); During deleting I got exception: IOException: There is not enough space on the disk. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) Size of both files is maximum few MB. And I checked - there is enough free space

Comments

Sign in or sign up to comment and upvote.

No comments yet.