Skip to content

Commit bf280dd

Browse files
authored
Merge pull request #713 from IntersectMBO/wenkokke/rename-snapshot-invalid-error
rename: ErrSnapshotNameInvalid -> ErrInvalidSnapshotName
2 parents dcb9bdb + dcdd2df commit bf280dd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Database/LSMTree/Internal/Paths.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ instance IsString SnapshotName where
103103
fromString = toSnapshotName
104104

105105
data InvalidSnapshotNameError
106-
= ErrSnapshotNameInvalid !String
106+
= ErrInvalidSnapshotName !String
107107
deriving stock (Show)
108108
deriving anyclass (Exception)
109109

@@ -173,7 +173,7 @@ isValidSnapshotName str =
173173
toSnapshotName :: String -> SnapshotName
174174
toSnapshotName str
175175
| isValidSnapshotName str = SnapshotName str
176-
| otherwise = throw (ErrSnapshotNameInvalid str)
176+
| otherwise = throw (ErrInvalidSnapshotName str)
177177

178178
snapshotsDir :: SessionRoot -> FsPath
179179
snapshotsDir (SessionRoot dir) = dir </> mkFsPath ["snapshots"]

src/Database/LSMTree/Internal/Unsafe.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ listSnapshots sesh = do
14201420
pure $ catMaybes snaps
14211421
where
14221422
checkSnapshot hfs root s = do
1423-
-- TODO: rethrow 'ErrSnapshotNameInvalid' as 'ErrSnapshotDirCorrupted'
1423+
-- TODO: rethrow 'ErrInvalidSnapshotName' as 'ErrSnapshotDirCorrupted'
14241424
let snap = Paths.toSnapshotName s
14251425
-- check that it is a directory
14261426
b <- FS.doesDirectoryExist hfs

0 commit comments

Comments
 (0)