aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-06-05 18:00:29 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-06-05 18:00:29 +0200
commitf0869cb1e98c574deecb350f8e879e1be39de94b (patch)
tree2d6ae04fc2987c73c8f2fd8555250fab669a737c
parentc61333dd11f3ba8a4c8155cb58d7b081d2096a94 (diff)
allow absolute file names
-rw-r--r--src/Store/Store.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Store/Store.hs b/src/Store/Store.hs
index 1ec59ef..b55c56d 100644
--- a/src/Store/Store.hs
+++ b/src/Store/Store.hs
@@ -171,7 +171,7 @@ readFile' ::
(G.BlobOid GB.LgRepo -> ReaderT GB.LgRepo IO a) ->
FilePath ->
StoreM a
-readFile' cat fp = do
+readFile' cat (makeRelative "/" -> fp) = do
State {tid} <- get
Env {repo} <- ask
lift $ G.runRepository GB.lgFactory repo do
@@ -187,7 +187,7 @@ readFile' cat fp = do
=<< G.treeEntry tree (B.fromString fp)
writeFile :: FilePath -> LB.ByteString -> StoreM ()
-writeFile (B.fromString -> fp) v = do
+writeFile (B.fromString . makeRelative "/" -> fp) v = do
State {tid} <- get
Env {repo} <- ask
tid' <- lift $ G.runRepository GB.lgFactory repo do
@@ -197,7 +197,7 @@ writeFile (B.fromString -> fp) v = do
modify $ \s -> s {tid = tid'}
deleteFile :: FilePath -> StoreM ()
-deleteFile (B.fromString -> fp) = do
+deleteFile (B.fromString . makeRelative "/" -> fp) = do
State {tid} <- get
Env {repo} <- ask
tid' <- lift $ G.runRepository GB.lgFactory repo do