lassik / mergedotnet

GUI-based N-way file sync program that does SFTP
Other
0 stars 0 forks source link

Allow retry when disk full #9

Open lassik opened 10 years ago

lassik commented 10 years ago

Stacktrace example:

Error A CreateFile lowq-tracks/house/Terry Lee Brown Jr. - Consolidation (2013).mp4 based on B: System.IO.IOException: There is not enough space on the disk.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
   at Merge.LocalConn.WriteToFile(Byte[] buf, Int32 nbytes) in C:\Users\lassi\persist\private\code\MergeDotNet\Merge\LocalConn.cs:line 135
   at Merge.Op.CreateFile.Perform() in C:\Users\lassi\persist\private\code\MergeDotNet\Merge\Op.cs:line 137
   at Merge.OpForm.btnPerform_Click(Object sender, EventArgs e) in C:\Users\lassi\persist\private\code\MergeDotNet\Merge\OpForm.cs:line 48

lassik commented 10 years ago

Does Mono support this? Can Mono run Renci.SSHNet?


Original Comment By: Lassi Kortela

lassik commented 10 years ago

That's Exception.HResult: http://msdn.microsoft.com/en-us/library/system.exception.hresult(v=vs.110).aspx


Original Comment By: Lassi Kortela

lassik commented 10 years ago

Helpful StackOverflow thread:

http://stackoverflow.com/questions/9293227/how-to-check-if-ioexception-is-not-enough-disk-space-exception-type

.NET 3.5 solution involves marshalling. One commenter says that "In .NET 4.5, the HResult property getter is now Public". Maybe upgrade our project to .NET 4.5 at some point and then fix this?


Original Comment By: Lassi Kortela