use takeDirectory instead of parentDir
authorJoey Hess <joeyh@joeyh.name>
Thu, 22 Sep 2016 15:25:01 +0000 (11:25 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 22 Sep 2016 15:25:01 +0000 (11:25 -0400)
No need for a trailing slash in the directory here, so avoid pulling in an
extra module.

Utility/FreeDesktop.hs

index 49cee0affbac2966bece4a09b3d3051563b87341..67f6219bd11939220e5468133cad5adf68c4e5a0 100644 (file)
@@ -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