more OsPath conversion
this avoids 1 copy
This commit is contained in:
parent
19dea33f57
commit
2fa1631041
1 changed files with 4 additions and 4 deletions
|
@ -37,9 +37,9 @@ initDb db migration = do
|
||||||
let tmpdb' = fromOsPath tmpdb
|
let tmpdb' = fromOsPath tmpdb
|
||||||
createAnnexDirectory tmpdbdir
|
createAnnexDirectory tmpdbdir
|
||||||
#if MIN_VERSION_persistent_sqlite(2,13,3)
|
#if MIN_VERSION_persistent_sqlite(2,13,3)
|
||||||
liftIO $ runSqliteInfo' tmpdb' (enableWAL tmpdb') migration
|
liftIO $ runSqliteInfo' tmpdb' (enableWAL tmpdb) migration
|
||||||
#else
|
#else
|
||||||
liftIO $ runSqliteInfo (enableWAL tmpdb') migration
|
liftIO $ runSqliteInfo (enableWAL tmpdb) migration
|
||||||
#endif
|
#endif
|
||||||
setAnnexDirPerm tmpdbdir
|
setAnnexDirPerm tmpdbdir
|
||||||
-- Work around sqlite bug that prevents it from honoring
|
-- Work around sqlite bug that prevents it from honoring
|
||||||
|
@ -58,6 +58,6 @@ initDb db migration = do
|
||||||
-
|
-
|
||||||
- Note that once WAL mode is enabled, it will persist whenever the
|
- Note that once WAL mode is enabled, it will persist whenever the
|
||||||
- database is opened. -}
|
- database is opened. -}
|
||||||
enableWAL :: RawFilePath -> SqliteConnectionInfo
|
enableWAL :: OsPath -> SqliteConnectionInfo
|
||||||
enableWAL db = over walEnabled (const True) $
|
enableWAL db = over walEnabled (const True) $
|
||||||
mkSqliteConnectionInfo (T.pack (fromRawFilePath db))
|
mkSqliteConnectionInfo (T.pack (fromOsPath db))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue