mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-31 04:03:40 +00:00
also re-extract if file modified
This commit is contained in:
@@ -76,7 +76,8 @@ import Startlude ( ($)
|
|||||||
, throwIO
|
, throwIO
|
||||||
, void
|
, void
|
||||||
)
|
)
|
||||||
import System.FSNotify ( Event(Added)
|
import System.FSNotify ( ActionPredicate
|
||||||
|
, Event(..)
|
||||||
, eventPath
|
, eventPath
|
||||||
, watchTree
|
, watchTree
|
||||||
, withManager
|
, withManager
|
||||||
@@ -189,9 +190,11 @@ watchPkgRepoRoot = do
|
|||||||
stop
|
stop
|
||||||
pure $ tryPutMVar box ()
|
pure $ tryPutMVar box ()
|
||||||
where
|
where
|
||||||
onlyAdded = \case
|
onlyAdded :: ActionPredicate
|
||||||
Added path _ isDir -> not isDir && takeExtension path == ".s9pk"
|
onlyAdded (Added path _ isDir) = not isDir && takeExtension path == ".s9pk"
|
||||||
_ -> False
|
onlyAdded (Modified path _ isDir) = not isDir && takeExtension path == ".s9pk"
|
||||||
|
onlyAdded _ = False
|
||||||
|
-- Added path _ isDir -> not isDir && takeExtension path == ".s9pk"
|
||||||
|
|
||||||
getManifest :: (MonadResource m, MonadReader r m, Has PkgRepo r)
|
getManifest :: (MonadResource m, MonadReader r m, Has PkgRepo r)
|
||||||
=> PkgId
|
=> PkgId
|
||||||
|
|||||||
Reference in New Issue
Block a user