diff --git a/cabal-dir.cabal b/cabal-dir.cabal
--- a/cabal-dir.cabal
+++ b/cabal-dir.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                cabal-dir
-version:             0.1.0.3
+version:             0.1.0.4
 stability:           Experimental
 synopsis:            show dist dir of 'cabal copy/install'
 description:         
@@ -31,10 +31,10 @@
 source-repository	this
   type:		git
   location:	git://github.com/YoshikuniJujo/cabal-dir.git
-  tag:		0.1.0.3
+  tag:		0.1.0.4
 
 executable cabal-dir
   main-is:             cabal-dir.hs
   -- other-modules:       
-  build-depends:       base > 3 && < 5, directory, Cabal
+  build-depends:       base > 3 && < 5, directory, Cabal, filepath
   ghc-options:         -Wall
diff --git a/cabal-dir.hs b/cabal-dir.hs
--- a/cabal-dir.hs
+++ b/cabal-dir.hs
@@ -12,6 +12,8 @@
 import System.Directory
 import Data.List
 
+import System.FilePath
+
 data InstallDirs = InstallDirs {
 	prefix :: FilePath,
 	bindir :: FilePath,
@@ -20,8 +22,11 @@
 	htmldir :: FilePath
  } deriving Show
 
+configFile :: FilePath
+configFile = "dist" </> "setup-config"
+
 getLocalBuildInfo :: IO LocalBuildInfo
-getLocalBuildInfo = read . (!! 1) . lines <$> readFile "./dist/setup-config"
+getLocalBuildInfo = read . (!! 1) . lines <$> readFile configFile
 
 getPackageDescription :: IO PackageDescription
 getPackageDescription = packageDescription <$>
@@ -51,7 +56,7 @@
 	libdir = ld,
 	datadir = dd,
 	htmldir = hd } =
-	"prefix : " ++ px ++ "/\n" ++
+	"prefix : " ++ px ++ [pathSeparator] ++ "\n" ++
 	"bindir : " ++ sw bd ++ "\n" ++
 	"libdir : " ++ sw ld ++ "\n" ++
 	"datadir: " ++ sw dd ++ "\n" ++
@@ -66,12 +71,13 @@
 removePrefix :: FilePath -> FilePath -> String
 removePrefix "" s = s
 removePrefix p s
-	| p `isPrefixOf` s = dropWhile (== '/') $ drop (length p) s
+	| p `isPrefixOf` s = dropWhile isPathSeparator $ drop (length p) s
 	| otherwise = addCurrent s
 
 addCurrent :: FilePath -> FilePath
-addCurrent fp@('/' : _) = fp
-addCurrent fp = "./" ++ fp
+addCurrent fp@(h : _)
+	| isPathSeparator h = fp
+addCurrent fp = "." ++ [pathSeparator] ++ fp
 
 main :: IO ()
 main = do
