diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-23 12:24:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-23 12:24:46 -0400 |
commit | 377636850e154e74836016520c0b346251409242 (patch) | |
tree | 8bd047d4c6aca2c4a13f4ff5c0aa088c7b521d87 /Build | |
parent | 52b2fbd12147f07b4c55fa88b273b9df1ac93d46 (diff) |
use copyFile (supports binary icon file)
Diffstat (limited to 'Build')
-rw-r--r-- | Build/InstallDesktopFile.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Build/InstallDesktopFile.hs b/Build/InstallDesktopFile.hs index 7d5e250f7..e5e46a0d3 100644 --- a/Build/InstallDesktopFile.hs +++ b/Build/InstallDesktopFile.hs @@ -99,9 +99,10 @@ installOSXAppFile appdir appfile mcontent = do ( return $ "/Applications" </> appdir </> appfile , return $ home </> "Desktop" </> appdir </> appfile ) - content <- maybe (readFile src) return mcontent createDirectoryIfMissing True (parentDir dest) - writeFile dest content + case mcontent of + Just content -> writeFile dest content + Nothing -> copyFile src dest mode <- fileMode <$> getFileStatus src setFileMode dest mode |