From 1835f915174e9fdf5aa73372efa80e4330b528f2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 14 Apr 2016 13:07:46 -0400 Subject: fix bug in unlocked file scanner that skipped over executable unlocked files --- Database/Keys.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Database') diff --git a/Database/Keys.hs b/Database/Keys.hs index 246ccd191..ed3878161 100644 --- a/Database/Keys.hs +++ b/Database/Keys.hs @@ -170,7 +170,10 @@ scanAssociatedFiles = whenM (isJust <$> inRepo Git.Branch.current) $ dropallassociated h = liftIO $ flip SQL.queueDb h $ delete $ from $ \(_r :: SqlExpr (Entity SQL.Associated)) -> return () - isregfile i = Git.Types.toBlobType (Git.LsTree.mode i) == Just Git.Types.FileBlob + isregfile i = case Git.Types.toBlobType (Git.LsTree.mode i) of + Just Git.Types.FileBlob -> True + Just Git.Types.ExecutableBlob -> True + _ -> False add h i k = liftIO $ flip SQL.queueDb h $ void $ insertUnique $ SQL.Associated (toIKey k) -- cgit v1.2.3