@@ -249,7 +249,7 @@ void IterateAndModifyFilesData (DefaultWatcherData data, string directory, bool
249
249
}
250
250
251
251
if ( dispatch )
252
- DispatchEvents ( data . FSW , FileAction . Added , filename ) ;
252
+ DispatchEvents ( data . FSW , FileAction . Added , Path . GetRelativePath ( directory , filename ) ) ;
253
253
} else if ( fd . Directory == directory ) {
254
254
fd . NotExists = false ;
255
255
}
@@ -268,7 +268,7 @@ void IterateAndModifyFilesData (DefaultWatcherData data, string directory, bool
268
268
removed = new List < string > ( ) ;
269
269
270
270
removed . Add ( filename ) ;
271
- DispatchEvents ( data . FSW , FileAction . Removed , filename ) ;
271
+ DispatchEvents ( data . FSW , FileAction . Removed , Path . GetRelativePath ( fd . Directory , filename ) ) ;
272
272
}
273
273
}
274
274
@@ -293,14 +293,14 @@ void IterateAndModifyFilesData (DefaultWatcherData data, string directory, bool
293
293
removed = new List < string > ( ) ;
294
294
295
295
removed . Add ( filename ) ;
296
- DispatchEvents ( data . FSW , FileAction . Removed , filename ) ;
296
+ DispatchEvents ( data . FSW , FileAction . Removed , Path . GetRelativePath ( fd . Directory , filename ) ) ;
297
297
continue ;
298
298
}
299
299
300
300
if ( creation != fd . CreationTime || write != fd . LastWriteTime ) {
301
301
fd . CreationTime = creation ;
302
302
fd . LastWriteTime = write ;
303
- DispatchEvents ( data . FSW , FileAction . Modified , filename ) ;
303
+ DispatchEvents ( data . FSW , FileAction . Modified , Path . GetRelativePath ( fd . Directory , filename ) ) ;
304
304
}
305
305
}
306
306
0 commit comments