musenet / nekodrive

Automatically exported from code.google.com/p/nekodrive
0 stars 0 forks source link

Client and Neko does not work while some files has I/O errors. #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Client or Mount with Neko on drive that has some files corrupted.

What is the expected output? What do you see instead?
Rest of folder or files should be visible and corrupted files should be 
skipped. Now no files and no folders are listed in client and neko.
I found this bug because I had corrupted 2 files in ext4. I had no idea what 
was wrong - (client dropped some IO error), after i wrot my client i debugged 
and found it and fixed :P. 
Ofc I fixed this files to with fsck.

What version of the product are you using? On what operating system?
Client 1_7 and neko 0_9.

Please provide any additional information below.
I made small app myself and found this problem. Solution is pretty simple just 
add try/catch in iterating folders and files loop, like:
foreach (string item in _nfsClient.GetItemList(".", false))
{
    try/catch here, and log or do something with error (message box is bad idea because if few files will be corrupted it will be like alert spam ;P)
    NFSAttributes attrib = _nfsClient.GetItemAttributes(item); <-- this causing the bug when I/O error.
}

Original issue reported on code.google.com by daniel.m...@gmail.com on 12 Jan 2015 at 7:18