use copyFile (supports binary icon file)
This commit is contained in:
parent
52b2fbd121
commit
377636850e
1 changed files with 3 additions and 2 deletions
|
@ -99,9 +99,10 @@ installOSXAppFile appdir appfile mcontent = do
|
||||||
( return $ "/Applications" </> appdir </> appfile
|
( return $ "/Applications" </> appdir </> appfile
|
||||||
, return $ home </> "Desktop" </> appdir </> appfile
|
, return $ home </> "Desktop" </> appdir </> appfile
|
||||||
)
|
)
|
||||||
content <- maybe (readFile src) return mcontent
|
|
||||||
createDirectoryIfMissing True (parentDir dest)
|
createDirectoryIfMissing True (parentDir dest)
|
||||||
writeFile dest content
|
case mcontent of
|
||||||
|
Just content -> writeFile dest content
|
||||||
|
Nothing -> copyFile src dest
|
||||||
mode <- fileMode <$> getFileStatus src
|
mode <- fileMode <$> getFileStatus src
|
||||||
setFileMode dest mode
|
setFileMode dest mode
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue