From: Joey Hess Date: Fri, 13 Aug 2021 18:51:15 +0000 (-0400) Subject: inotify reports paths relative to directory being watched X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~87^2~107 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7503b8448bd2a589f3bcfcc00a8cb1d52bd0d4bb;p=git-annex.git inotify reports paths relative to directory being watched Sponsored-by: Dartmouth College's DANDI project --- diff --git a/Annex/Verify.hs b/Annex/Verify.hs index 368677a8f2..72ac71b868 100644 --- a/Annex/Verify.hs +++ b/Annex/Verify.hs @@ -199,13 +199,13 @@ tailVerify iv f finished = inotifycreate i cont = INotify.addWatch i evs (P.takeDirectory f) $ \case -- Ignore changes to other files in the directory. INotify.Created { INotify.filePath = fn } - | fn /= f -> noop + | fn /= basef -> noop INotify.MovedIn { INotify.filePath = fn } - | fn /= f -> noop + | fn /= basef -> noop INotify.Opened { INotify.maybeFilePath = fn } - | fn /= Just f -> noop + | fn /= Just basef -> noop INotify.Modified { INotify.maybeFilePath = fn } - | fn /= Just f -> noop + | fn /= Just basef -> noop _ -> cont where evs = @@ -215,6 +215,7 @@ tailVerify iv f finished = , INotify.Open , INotify.Modify ] + basef = P.takeFileName f go = INotify.withINotify $ \i -> do h <- waitforfiletoexist i