more OsPath conversion

Git.Types now uses it, as does TopFilePath, making for plenty of new
compile errors needing fixing.

Sponsored-by: Brock Spratlen
This commit is contained in:
Joey Hess 2025-01-23 16:15:00 -04:00
parent 12660314f1
commit ea775baccd
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
22 changed files with 159 additions and 163 deletions

View file

@ -21,11 +21,12 @@ import System.OsString as X hiding (length)
import qualified System.OsString
import qualified Data.ByteString as B
import Utility.OsPath
import Prelude ((.), Int)
{- Avoid System.OsString.length, which returns the number of code points on
- windows. This is the number of bytes. -}
length :: System.OsString.OsString -> Int
length = B.length . fromOsString
length = B.length . fromOsPath
#else
import Data.ByteString as X hiding (length)
import Data.ByteString (length)