7360fd51f813b93365c2be2628dabdac0b4985ae
[mono.git] / mcs / class / System / System.IO / ChangeLog
1 2009-11-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
2
3         * DefaultWatcher.cs: patch by James P. Mitchel III.
4         The change corrects an instance of unsynchronized access to shared
5         state and is probably the intent of the original code.
6
7 2009-09-30  Marek Habersack  <mhabersack@novell.com>
8
9         * InotifyWatcher.cs: optimized the Renamed event child update loop
10         in the previous commit for directories in ProcessEvents.
11
12 2009-09-30 Gonzalo Paniagua Javier <gonzalo@novell.com>
13
14         * InotifyWatcher.cs: fixes bug #322330. Patch by Alexander Kojevnikov.
15         This patch fixes the issues reported by the OP and in my previous
16         comment. In particular:
17
18         Hunks 1 and 4 remove the new_name_needed flag, it's not used
19         anywhere and only adds confusion.
20
21         Hunk 2 skips DeleteSelf event for sub-directories, they receive the
22         Delete event anyway.
23
24         Hunk 3 makes sure that we use a combination of Deleted+Created
25         notifications instead of a single Renamed notification, if the watched item
26         has been moved from one directory to another. This is because RenamedEventArgs
27         supports only one directory name: FullPath is always directory+name,
28         OldFullPath is always directory+old_name.
29
30         Hunk 5 updates relevant InotifyData instances with the new directory
31         name.  Without this, notifications always use the original folder names.
32
33         The last hunk may be a bit slow as it needs to iterate on all the
34         InotifyData instances. On the other hand, we are already doing it on the
35         Delete event (lines 560:568) and by default inotify allows only 8192 watches
36         per user.
37
38 2009-07-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
39
40         * InotifyWatcher.cs: when a watched subdirectory is deleted, remove it
41         from the list of children and only raise an event if it matches the
42         filter.
43
44 2009-06-04  Marek Habersack  <mhabersack@novell.com>
45
46         * InotifyWatcher.cs: filter pattern should be matched on file name
47         alone, not on the relative path of the file triggering the
48         event. Fixes bug #509998
49
50 2009-03-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
51
52         * InotifyWatcher.cs: don't send events when a directory is created
53         unless it matches the pattern.  Fixes bug #484082.
54
55 2009-01-26  Marek Habersack  <mhabersack@novell.com>
56
57         * SearchPattern.cs: make IsMatch work for situations when there is
58         no wildcard in the pattern, but a subdirectory match is being
59         tested, e.g. pattern == "file.txt" and text ==
60         "subdir/file.txt". Lack of support for this has been causing
61         watching for changes to ASP.NET's web.config in subdirectories to
62         fail.
63
64 2008-11-06  Jonathan Chambers  <joncham@gmail.com>
65
66         * MonoIO.cs : Add DuplicateHandle.
67
68 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
69
70         * InotifyWatcher.cs: IN_CLOSE_WRITE is triggered when a writable file is
71         closed, but that does not mean that the file was actually modified.
72         Fixes bug #323188.
73
74 2008-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
75
76         * InotifyWatcher.cs: Really fix #359181.
77
78 2008-09-01  Dick Porter  <dick@ximian.com>
79
80         * InotifyWatcher.cs: Revert fix for bug 322330, as it is somehow
81         breaking other stuff.
82
83 2008-06-20  Dick Porter  <dick@ximian.com>
84
85         * InotifyWatcher.cs: If a directory is renamed, make sure the old
86         version is removed from the requests hash.  Fixes bug 322330.
87
88 2008-06-18  Rodrigo Kumpera  <rkumpera@novell.com>
89
90         * InotifyWatcher.cs: patch from Juraj Skripsky to fix
91         rename events (fixes bug #359181).
92
93
94 2008-04-17  Marek Habersack  <mhabersack@novell.com>
95
96         * FileSystemWatcher.cs: added support for NullFileWatcher. Fixes
97         bug #354701
98
99         * NullFileWatcher.cs: added an IFileWatcher implementation which
100         does nothing. Selected only by setting the MONO_MANAGED_WATCHER
101         environment variable to 'disabled'. Fixes bug #354701
102
103 Tue Mar 11 14:29:22 CET 2008 Paolo Molaro <lupus@ximian.com>
104
105         * InotifyWatcher.cs: patch from Anders Rune Jensen (anders@iola.dk)
106         to reduce memory usage (fixes bug #362147).
107
108 2007-11-06  Sebastien Pouliot  <sebastien@ximian.com>
109
110         * InvalidDataException.cs: Added private ctor for serialization. Fix 
111         bug #324569.
112
113 2007-10-30  Robert Jordan  <robertj@gmx.net>
114
115         * MonoSyncFileStream.cs: Add.
116
117 2007-07-19  Juraj Skripsky  <js@hotfeet.ch>
118
119         * FileSystemWatcher.ch (RaiseEvent): Invoke delegate directly, we don't
120         need the extra control provided by using GetInvocationList().
121
122 2006-11-01  Sebastien Pouliot  <sebastien@ximian.com> 
123
124         * ErrorEventHandler.cs: Remove [Serializable] in NET_2_0.
125         * FileSystemEventHandler.cs: Remove [Serializable] in NET_2_0.
126         * FileSystemWatcher.cs: Add missing attributes for NET_2_0.
127         * InvalidDataException.cs: Seal class and remove serialization ctor.
128         * NotifyFilters.cs: Remove [Serializable] in NET_2_0.
129         * RenamedEventHandler.cs: Remove [Serializable] in NET_2_0.
130         * WatcherChangeTypes.cs: Remove [Serializable] in NET_2_0.
131
132 2006-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
133
134         * InotifyWatcher.cs: workaround for a weird case. Someone is watching
135         /dev with recursion enabled and the inotify file descriptor shows up
136         as a directory that fails to open. Already reported to Robert Love.
137
138 2006-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
139
140         * InotifyWatcher.cs: fix file names for the rename event.
141         * FileSystemWatcher.cs: ignore exceptions that happen when invoking
142         event handlers.
143
144 2006-08-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
145
146         * InotifyWatcher.cs: handle CloseWrite, as it might happen without other
147         modify events.
148
149 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
150
151         * FileSystemWatcher.cs: avoid argument null when we don't know yet the
152         target of a rename.
153
154 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
155
156         * InotifyWatcher.cs: warn about inotify user watches limit.
157
158 2005-07-31  Sebastien Pouliot  <sebastien@ximian.com> 
159
160         * FileSystemWatcher.cs: Add an EnvironmentPermission assert to read
161         environment variable MONO_MANAGED_WATCHER.
162
163 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
164
165         * FAMWatcher.cs: remove unused method.
166         * InotifyWatcher.cs: new watcher supporting inotify directly, as there
167         are some distros that do not install 'gamin' anymore. This new watcher
168         takes priority over gamin, fam and default.
169         * FileSystemWatcher.cs: support for the new watcher.
170
171 2006-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
172
173         * FAMWatcher.cs: fix race condition when a directory is created and
174         populated before we start monitoring it. Patch by Thong Nguyen.
175
176 2006-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
177
178         * FAMWatcher.cs: add new directories to the hashtable after start
179         monitoring them, otherwise the ReqNum is not set. Fixes bug #77971.
180
181 2006-01-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
182
183         * FAMWatcher.cs: fix arraylist access when a new directory is added and
184         the new directory is watched too. Closes bug #77068.
185
186 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
187
188         * FAMWatcher.cs: 
189         * FileSystemWatcher.cs: use libgamin-1.so.0 instead of libfam.so.0 when
190         the runtime finds libgamin. On SUSE libgamin and libfam are not the same
191         libraries (on debian, they are just the same and there's no fam-server).
192
193 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
194
195         * FAMWatcher.cs: reverting my patch. Seems that something got
196         changed in gamin.
197
198 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
199
200         * FAMWatcher.cs: make this really inactive when there are no events to
201         process.
202
203 2005-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
204
205         * FAMWatcher.cs: move the call to StartMonitoringDirectory out of any
206         locks. Before, for a high amount of subdirectories (~500) it hanged
207         after filling the write buffer of FAM socket. Fixes bug #74398.
208
209 2005-04-05  Lluis Sanchez Gual  <lluis@novell.com>
210
211         * FAMWatcher.cs: Fix cast exception when disposing watchers.
212
213 2005-03-30  Geoff Norton  <gnorton@customerdna.com>
214
215         * KeventWatcher.cs: Fix a file handle leak on raised events.
216
217 2005-02-10  Lluis Sanchez Gual  <lluis@novell.com>
218
219         * DefaultWatcher.cs: Fix nullref exception when the object is disposed
220         without any watcher.
221
222 2004-12-03  Geoff Norton  <gnorton@customerdna.com>
223
224         * SearchPattern.cs:  Have IsMatch(string)
225         call IsMatch(string, bool) to avoid setting a instance variable in a
226         method that logically should not be changing it.
227
228 2004-12-02  Geoff Norton  <gnorton@customerdna.com>
229
230         * KeventWatcher.cs: Add IDisposable to our kevent struct
231         so the disposer gets called.  Fixes a small memory leak.  Dont monitor
232         LastAccessedTime for changed files, as this will cause AppUnloading in XSP
233         when global.asax is accessed after creation.  Use a case-insensitive IsMatch
234         to deal with OSX Case-aware/Case-insensitive filesystem.
235         * SearchPattern.cs: Add a overload to IsMatch to explicitly set
236         the ignore field for OSX case-aware yet case-insensitive filesystem.  This
237         allows monitoring of global.asax to happen properly.
238
239 2004-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
240
241         * DefaultWatcher.cs: make it work when the FileMask does not have
242         wildcards and we're watching a directory.
243
244 2004-11-22  Ben Maurer  <bmaurer@ximian.com>
245
246         * DefaultWatcher.cs: Copy the hashtable when we scan for changes
247         so that you can make modifications in a handler. Fixes 65966.
248
249 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
250
251         * KeventWatcher.cs:  Dont marshal a string to a struct
252         that the kernel will hold; this causes a double free bug.  Marshal
253         it as a IntPtr and clean it up in the dispose method.  Don't pass
254         FullName to the pattern matcher, pass the filename.  Fixes bug #69692.
255
256 2004-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
257
258         * DefaultWatcher.cs: if the file is removed between reading the
259         directory and filling the file info, catch the exception and ignore the
260         file. Fixes bug #59482.
261
262 2004-10-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
263
264         * DefaultWatcher.cs: don't use Directory.GetFileSystemEntries when the
265         pattern has no wildcards. Fixes bug #67447.
266
267 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
268
269         * FAMWatcher.cs: s/fam/libfam.so.0/ so that g_module finds it even
270         when the development package is not installed.
271
272 2004-08-06  Geoff Norton <gnorton@customerdna.com>
273
274         * FileSystemWatcher.cs: Use the new KeventWatcher if its supported
275         * KeventWatcher.cs: Added to cvs
276
277 2004-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
278
279         * DefaultWatcher.cs: fixed subdirectories notifications and don't
280         fail when any directory is removed. Closes bug #59840.
281
282 2004-05-09  Atsushi Enomoto <atsushi@ximian.com>
283
284         * FileSystemWatcher.cs : csc build fix. Duplicate name between class
285           field and local variable. (already filed in bugzilla #47991).
286
287 2004-05-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
288
289         * DefaultWatcher.cs:
290         * FAMWatcher.cs: use MangledFilter instead of Filter.
291
292         * FileSystemWatcher.cs: added MangledFilter and finalizer.
293
294         * SearchPattern.cs: fixed the case when the pattern is "*".
295
296 2004-03-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
297
298         * FAMWatcher.cs: support monitoring subdirectories. FAM doesn't do that,
299         so we have to register the existing directories and add the new ones
300         that might be created.
301
302         * SearchPattern.cs: provide the pattern when it's wrong.
303
304 2004-03-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
305
306         * SearchPattern.cs: small improvement for files with no wildcard.
307
308 2004-01-27  Nick Drochak <ndrochak@ieee.org>
309
310         * FAMWatcher.cs:
311         * FileSystemWatcher.cs: Remove unused variables. Eliminates a couple of
312         build warnings.
313
314 2004-01-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
315
316         * DefaultWatcher.cs: fixed condition for removal from the watches list.
317
318 2004-01-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
319
320         * DefaultWatcher.cs: check if the FileSystemWatcher is in WaitForChange
321         and call Monitor.PulseAll in that case.
322
323 2004-01-21  Gonzalo Paniagua Javier <gonzalo@ximian.com>
324
325         * DefaultWatcher.cs: implemented.
326         * FAMWatcher.cs: don't stop the thread when we add a new watch.
327         * FileSystemWatcher.cs: on windows we use the default watcher by now.
328
329 2004-01-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
330
331         * DefaultWatcher.cs: stub for the default watcher.
332         * WindowsWatcher.cs: stub for the windows watcher.
333         
334         * FAMWatcher.cs: FAM watcher.
335         
336         * FileAction.cs: enum with event types.
337         
338         * FileSystemEventArgs.cs: added SetName property.
339         * FileSystemWatcher.cs: added support for the 3 watchers.
340
341         * IFileWatcher.cs: interface implemented by the watchers. 
342         * SearchPattern.cs: copied from corlib.
343
344 2003-07-17  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
345
346         * FileSystemWatcher.cs: Reworked attributes based on the new Consts
347         scheme
348
349 2003-07-13  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
350
351         * FileSystemWatcher.cs: Added missing attributes
352
353 2003-07-09  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
354
355         * IODescriptionAttribute.cs: Removed unneeded field
356
357 2003-05-16  Dick Porter  <dick@ximian.com>
358
359         * MonoIO.cs: Implement GetTempPath
360
361 2003-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
362
363         * FileSystemWatcher.cs: added attributes and some more implementation.
364         Now only the guts left to do.
365
366         * FileSystemEventArgs.cs:
367         * RenamedEventArgs.cs: implemented a couple of properties.
368
369 2002-10-31  Dick Porter  <dick@ximian.com>
370
371         * MonoIO.cs: Return the error status in a parameter, as the
372         GetLastError() value has long since been blown away if we try and
373         look it up in a subsequent internal call invocation.
374
375 2002-09-15  Duncan Mak  <duncan@ximian.com>
376
377         * FileSystemWatcher.cs (FileSystemWatcher): Fixed the null-param
378         constructor.
379
380 2002-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
381
382         * FileSystemWatcher.cs: IDisposable fixes.
383
384 2002-08-23  Gonzalo Paniagua Javier <gonzalo@ximian.com>
385
386         * InternalBufferOverflowException.cs:
387         * NotifyFilters.cs:
388         * WatcherChangeTypes.cs: little fixes based on class status page.
389
390 2002-08-15  Tim Coleman <tim@timcoleman.com>
391         * ErrorEventArgs.cs:
392         * ErrorEventHandler.cs:
393         * FileSystemEventArgs.cs:
394         * FileSystemEventHandler.cs:
395         * FileSystemWatcher.cs:
396         * InternalBufferOverflowException.cs:
397         * IODescriptionAttribute.cs:
398         * NotifyFilters.cs:
399         * RenamedEventArgs.cs:
400         * RenamedEventHandler.cs:
401         * WaitForChangedResult.cs:
402         * WatcherChangeTypes.cs:
403                 New stubs added.
404
405 2002-07-20  Dick Porter  <dick@ximian.com>
406
407         * MonoIO.cs: Cut down copy of corlib/System.IO/MonoIO.cs, so it
408         can be used from the System assembly but still not be exposed to
409         users.
410