use takeDirectory instead of parentDir
No need for a trailing slash in the directory here, so avoid pulling in an extra module.
This commit is contained in:
parent
b69b764717
commit
ece88889a7
1 changed files with 1 additions and 2 deletions
|
@ -29,7 +29,6 @@ module Utility.FreeDesktop (
|
|||
) where
|
||||
|
||||
import Utility.Exception
|
||||
import Utility.Path
|
||||
import Utility.UserInfo
|
||||
import Utility.Process
|
||||
import Utility.PartialPrelude
|
||||
|
@ -82,7 +81,7 @@ buildDesktopMenuFile d = unlines ("[Desktop Entry]" : map keyvalue d) ++ "\n"
|
|||
|
||||
writeDesktopMenuFile :: DesktopEntry -> String -> IO ()
|
||||
writeDesktopMenuFile d file = do
|
||||
createDirectoryIfMissing True (parentDir file)
|
||||
createDirectoryIfMissing True (takeDirectory file)
|
||||
writeFile file $ buildDesktopMenuFile d
|
||||
|
||||
{- Path to use for a desktop menu file, in either the systemDataDir or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue