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

@ -10,6 +10,7 @@
module Assistant.Install.AutoStart where
import Common
import Utility.FreeDesktop
#ifdef darwin_HOST_OS
import Utility.OSX
@ -18,11 +19,11 @@ import Utility.SystemDirectory
import Utility.FileSystemEncoding
#endif
installAutoStart :: FilePath -> FilePath -> IO ()
installAutoStart :: String -> OsPath -> IO ()
installAutoStart command file = do
#ifdef darwin_HOST_OS
createDirectoryIfMissing True (fromRawFilePath (parentDir (toRawFilePath file)))
writeFile file $ genOSXAutoStartFile osxAutoStartLabel command
createDirectoryIfMissing True (parentDir file)
writeFile (fromOsPath file) $ genOSXAutoStartFile osxAutoStartLabel command
["assistant", "--autostart"]
#else
writeDesktopMenuFile (fdoAutostart command) file