+2004-12-02 Geoff Norton <gnorton@customerdna.com>
+
+ * System.IO/KeventWatcher.cs: Add IDisposable to our kevent struct
+ so the disposer gets called. Fixes a small memory leak. Dont monitor
+ LastAccessedTime for changed files, as this will cause AppUnloading in XSP
+ when global.asax is accessed after creation. Use a case-insensitive IsMatch
+ to deal with OSX Case-aware/Case-insensitive filesystem.
+ * System.IO/SearchPattern.cs: Add a overload to IsMatch to explicitly set
+ the ignore field for OSX case-aware yet case-insensitive filesystem. This
+ allows monitoring of global.asax to happen properly.
+
2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* System_test.dll.sources: added CookieContainerTest.cs.
namespace System.IO {
- struct kevent {
+ struct kevent : IDisposable {
public int ident;
public short filter;
public ushort flags;
foreach (FileSystemInfo fsi in dir.GetFileSystemInfos() )
if (data.DirEntries.ContainsKey (fsi.FullName) && (fsi is FileInfo)) {
KeventFileData entry = (KeventFileData) data.DirEntries [fsi.FullName];
- if ( (entry.LastWriteTime != fsi.LastWriteTime) || (entry.LastAccessTime != fsi.LastAccessTime) ) {
+ if (entry.LastWriteTime != fsi.LastWriteTime) {
filename = fsi.Name;
fa = FileAction.Modified;
data.DirEntries [fsi.FullName] = new KeventFileData(fsi, fsi.LastAccessTime, fsi.LastWriteTime);
}
}
- if (!fsw.Pattern.IsMatch(filename))
+ if (!fsw.Pattern.IsMatch(filename, true))
return;
lock (fsw) {
Compile (pattern);
}
+ // OSX has a retarded case-insensitive yet case-aware filesystem
+ // so we need a overload in here for the Kqueue watcher
+ public bool IsMatch (string text, bool ignore)
+ {
+ this.ignore = ignore;
+ return IsMatch (text);
+ }
+
public bool IsMatch (string text)
{
if (!hasWildcard)