FIX: the issue of calling TFileSystemWatcher.RemoveWatch() @ 3ecba99

This commit is contained in:
rich2014 2024-12-28 20:40:42 +08:00
commit 8b70e6bb1b

View file

@ -3371,8 +3371,10 @@ begin
end
else
begin
realPath:= (FileSource as TFileSystemFileSource).GetRealPath(FWatchPath);
TFileSystemWatcher.RemoveWatch(realPath, @WatcherEvent);
if FileSource.IsClass(TFileSystemFileSource) then begin
realPath:= (FileSource as TFileSystemFileSource).GetRealPath(FWatchPath);
TFileSystemWatcher.RemoveWatch(realPath, @WatcherEvent);
end;
FWatchPath := EmptyStr;
end;
end;