use RawFilePath for opening sqlite databases
authorJoey Hess <joeyh@joeyh.name>
Tue, 26 Dec 2023 22:31:52 +0000 (18:31 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 26 Dec 2023 22:31:52 +0000 (18:31 -0400)
commit8a3beabf350899e369dcd57a72432930581fbc25
treef89c8900b25be283dcc36a132b8ba967f3de6952
parent6d789c9c81d45118b2e7890f15d3636c04e21d85
use RawFilePath for opening sqlite databases

Fix a crash opening sqlite databases when run in a non-unicode locale,
with a remote that uses a non-unicode filepath. In that situation
converting to Text fails.

The fix needs git-annex to be built with persistent-sqlite 2.13.3.
Building against older versions still works, but that version is used when
building with stack.

Database.RawFilePath is a lot of code copied from persistent-sqlite and
lightly modified, since only 1 function in persistent-sqlite was made to
support RawFilePath. This is a bit of a pain, and I hope that
persistent-sqlite will eventually switch to using OsPath, allowing this
module to be removed from git-annex.

Sponsored-by: k0ld on Patreon
CHANGELOG
COPYRIGHT
Database/ContentIdentifier.hs
Database/Handle.hs
Database/Init.hs
Database/RawFilePath.hs [new file with mode: 0644]
doc/bugs/SQlite_failed_when_copying_to_remote_repository.mdwn
git-annex.cabal