revert parentDir change
Reverts 965e106f24
Unfortunately, this caused breakage on Windows, and possibly elsewhere,
because parentDir and takeDirectory do not behave the same when there is a
trailing directory separator.
This commit is contained in:
parent
2fff78512d
commit
3bab5dfb1d
47 changed files with 99 additions and 96 deletions
|
@ -27,6 +27,7 @@ module Utility.FreeDesktop (
|
|||
) where
|
||||
|
||||
import Utility.Exception
|
||||
import Utility.Path
|
||||
import Utility.UserInfo
|
||||
import Utility.Process
|
||||
import Utility.PartialPrelude
|
||||
|
@ -78,7 +79,7 @@ buildDesktopMenuFile d = unlines ("[Desktop Entry]" : map keyvalue d) ++ "\n"
|
|||
|
||||
writeDesktopMenuFile :: DesktopEntry -> String -> IO ()
|
||||
writeDesktopMenuFile d file = do
|
||||
createDirectoryIfMissing True (takeDirectory file)
|
||||
createDirectoryIfMissing True (parentDir 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