Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Database/LSMTree/Internal/Paths.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ instance IsString SnapshotName where
fromString = toSnapshotName

data InvalidSnapshotNameError
= ErrSnapshotNameInvalid !String
= ErrInvalidSnapshotName !String
deriving stock (Show)
deriving anyclass (Exception)

Expand Down Expand Up @@ -173,7 +173,7 @@ isValidSnapshotName str =
toSnapshotName :: String -> SnapshotName
toSnapshotName str
| isValidSnapshotName str = SnapshotName str
| otherwise = throw (ErrSnapshotNameInvalid str)
| otherwise = throw (ErrInvalidSnapshotName str)

snapshotsDir :: SessionRoot -> FsPath
snapshotsDir (SessionRoot dir) = dir </> mkFsPath ["snapshots"]
Expand Down
2 changes: 1 addition & 1 deletion src/Database/LSMTree/Internal/Unsafe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ listSnapshots sesh = do
pure $ catMaybes snaps
where
checkSnapshot hfs root s = do
-- TODO: rethrow 'ErrSnapshotNameInvalid' as 'ErrSnapshotDirCorrupted'
-- TODO: rethrow 'ErrInvalidSnapshotName' as 'ErrSnapshotDirCorrupted'
let snap = Paths.toSnapshotName s
-- check that it is a directory
b <- FS.doesDirectoryExist hfs
Expand Down