FileSystemWatcher case bug

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I'm running into a problem where the FSW events report all filenames in
lower case. (The directory portion is okay, just the leaf file name is
broken.)
I found this thread from 6/02 stating as such, and a reply presenting a
workaround.
However, creating a DirectoryInfo or FileInfo object with the path and
asking for the Name or FullName still reports the lower case version, not
the correct user case.

Any ideas short of opening the file's or folder's parent dir, enumerating
all the files, comparing w/o case, and returning the matching entry? (Not
that's it's hard, just hoping for a better way...)

thanks,
mike

..Net 1.1.4372
---------------------


Here is the fix for that bug

Pass the FullPath into the Constructor of a DirectoryInfo Class and Read the
Name Property.
 
I have had no end of problems with this. I have seen the case problem. If
I run from a service I get different results than a windows app.

I have a database that hold the name coming from Directory.GetFiles and that
is different than what is returned. For a new API dot.net is one screwed up
set of routines.
 
Back
Top