diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-12 17:10:29 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-12 17:10:29 +0300 |
commit | c7d5766463e5e99fcd2352c7177cf057c1971615 (patch) | |
tree | 04e2c34217dd498111965a17b9cafcb633ed5c13 /apps/FixNtSymbolPath.hs | |
parent | minimize stack.yaml (diff) | |
download | windows-env-c7d5766463e5e99fcd2352c7177cf057c1971615.tar.gz windows-env-c7d5766463e5e99fcd2352c7177cf057c1971615.zip |
refactoring
Diffstat (limited to 'apps/FixNtSymbolPath.hs')
-rw-r--r-- | apps/FixNtSymbolPath.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/FixNtSymbolPath.hs b/apps/FixNtSymbolPath.hs index c75291e..a44a840 100644 --- a/apps/FixNtSymbolPath.hs +++ b/apps/FixNtSymbolPath.hs @@ -6,9 +6,9 @@ module Main (main) where -import Control.Monad (unless) +import Control.Monad (unless) import System.Directory (createDirectoryIfMissing, getCurrentDirectory) -import System.FilePath (combine) +import System.FilePath (combine) import qualified Environment @@ -32,16 +32,16 @@ getPdbsDirectoryPath = do fixNtSymbolPath :: IO () fixNtSymbolPath = do - let env = Environment.CurrentUserEnvironment - val <- Environment.queryFromRegistry env ntSymbolPath - let presentPaths = Environment.splitPaths val + let env = Environment.CurrentUser + val <- Environment.query env ntSymbolPath + let presentPaths = Environment.pathSplit val remoteSymbolsPath <- getRemoteSymbolsDirectoryPath pdbsPath <- getPdbsDirectoryPath let requiredPaths = [pdbsPath, remoteSymbolsPath] let missingPaths = filter (`notElem` presentPaths) requiredPaths unless (null missingPaths) $ do - let newval = Environment.joinPaths $ presentPaths ++ missingPaths - Environment.saveToRegistry env ntSymbolPath newval + let newval = Environment.pathJoin $ presentPaths ++ missingPaths + Environment.engrave env ntSymbolPath newval where ntSymbolPath = "_NT_SYMBOL_PATH" |