diff options
author | andygill@ku.edu <unknown> | 2008-09-16 17:23:13 +0000 |
---|---|---|
committer | andygill@ku.edu <unknown> | 2008-09-16 17:23:13 +0000 |
commit | dc2a2f0673661e8a9414191c318f54cf374fbfbd (patch) | |
tree | 80b95f58f8f645ccc129654ce4de91242093d793 /utils | |
parent | ab6f7888dfc275d3e8528465ecb058e2f2e8d8a3 (diff) | |
download | haskell-dc2a2f0673661e8a9414191c318f54cf374fbfbd.tar.gz |
Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
Diffstat (limited to 'utils')
-rw-r--r-- | utils/hpc/HpcMarkup.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/hpc/HpcMarkup.hs b/utils/hpc/HpcMarkup.hs index e618b25ba8..df7e43b5ea 100644 --- a/utils/hpc/HpcMarkup.hs +++ b/utils/hpc/HpcMarkup.hs @@ -17,6 +17,7 @@ import Data.List import Data.Maybe(fromJust) import Data.Array import Data.Monoid +import Control.Monad import qualified HpcSet as Set ------------------------------------------------------------------------------ @@ -453,7 +454,8 @@ writeFileUsing filename text = do #if __GLASGOW_HASKELL__ >= 604 -- create the dest_dir if needed - createDirectoryIfMissing True dest_dir + when (not (null dest_dir)) $ + createDirectoryIfMissing True dest_dir #endif writeFile filename text |