From 24dac226d6ed26d08f2959c769ba784340dd20ce Mon Sep 17 00:00:00 2001 From: Adrian Sieber Date: Sat, 1 Jun 2024 19:31:22 +0000 Subject: [PATCH] Don't ignore read-only files with a supported file extension --- tasklite-core/source/Cli.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasklite-core/source/Cli.hs b/tasklite-core/source/Cli.hs index 360603a..720dae5 100644 --- a/tasklite-core/source/Cli.hs +++ b/tasklite-core/source/Cli.hs @@ -130,7 +130,7 @@ import System.Directory ( getXdgDirectory, listDirectory, ) -import System.FilePath (()) +import System.FilePath (hasExtension, ()) import System.Process (readProcess) import Time.System (timeCurrentP) @@ -1332,7 +1332,7 @@ printOutput appName argsMb config = do hookFilesPermContent <- hookFilesPerm - & filter (\(_, perm) -> executable perm) + & filter (\(filePath, perm) -> hasExtension filePath || executable perm) & P.mapM ( \(filePath, perm) -> do fileContent <- readFile filePath