Skip to content

Commit 8c57217

Browse files
ohenleyonox
authored andcommitted
fix append ambiguity
1 parent 1edbdd5 commit 8c57217

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/inotify.adb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,17 @@ package body Inotify is
253253
if Object.Moves.Length = Object.Moves.Capacity then
254254
Object.Moves.Delete_First;
255255
end if;
256-
Object.Moves.Append ((Event.Cookie,
257-
(From => SU.To_Unbounded_String (Directory & "/" & Name),
258-
To => <>)));
259-
-- If inode is moved to outside watched directory,
260-
-- then there will never be a Moved_To or Moved_Self
261-
-- if instance is not recursive
256+
declare
257+
MP : Cookie_Move_Pair :=
258+
(Event.Cookie,
259+
(From => SU.To_Unbounded_String (Directory & "/" & Name),
260+
To => <>));
261+
begin
262+
Object.Moves.Append (MP);
263+
-- If inode is moved to outside watched directory,
264+
-- then there will never be a Moved_To or Moved_Self
265+
-- if instance is not recursive
266+
end;
262267
when Moved_To =>
263268
declare
264269
Cursor : Move_Vectors.Cursor := Find_Move (Event.Cookie);

0 commit comments

Comments
 (0)