William
November 29, 2010, 11:14pm
1
While on the topic of file system. I think I tripped over a bug.
So issuing the following on an “SD” volume:
Directory.GetFiles(“MM”);
Will *create the directory MM, instead of getting an IO error as one would expect. Not sure if NetMF bug, Fez bug, or a confluence of the two.
User_5
December 28, 2010, 1:15pm
2
It is throwing exceptions here. Please make a small program that generates the problem.
William
December 28, 2010, 1:43pm
3
Hi Mike. Test here on my domino creates dir. Dump is just extention method to Debug.Print elements. [url]http://www.fezzer.com/project/216/dump-collections/[/url]
public static void GetFiles()
{
// Delete if exists already.
Directory.Delete(@ "\SD\MM");
// Print Dirs before.
string[] dirs = Directory.GetDirectories(@ "\SD");
dirs.Dump("\nDirs Before:");
// Creates Dir \SD\MM
string[] files = Directory.GetFiles(@ "\SD\MM");
Debug.Print("\nFiles count:" + files.Length);
// Print Dirs after.
dirs = Directory.GetDirectories(@ "\SD");
dirs.Dump("\nDirs after:");
/* Output:
Dirs Before:
\SD\WJS
Files count:0
Dirs after:
\SD\WJS
\SD\MM
*/
}
User_5
December 28, 2010, 3:20pm
4
Thank you. We opened an issue for NETMF code. For now, you can check if the directory exists before getting the files…
William
December 28, 2010, 3:25pm
5
Thanks Mike. So you confirmed it was NETMF issue? I was not sure if it was SD driver, fez persis storage, or netmf.
User_5
December 28, 2010, 3:46pm
6
It is something inside the file system itself. We are investigating…
William
December 28, 2010, 10:35pm
7
I guess one quick way to Half the problem space is try the code on non-fez MF hardware to see if repro. If can repro, then issue probably just in netmf. I don’t have any non-fez hw - which I guess is a good thing.
User_5
December 29, 2010, 9:45am
8
It is very unlikely to be specific to GHI’s products. The problem is in the file system which is NETMF. It is easy to check if the folder exists before enumerating what’s inside it for now.