about summary refs log tree commit diff
path: root/tools/acid-migrate
diff options
context:
space:
mode:
Diffstat (limited to 'tools/acid-migrate')
-rw-r--r--tools/acid-migrate/Acid.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/acid-migrate/Acid.hs b/tools/acid-migrate/Acid.hs
index bc360694a64d..276102eb030b 100644
--- a/tools/acid-migrate/Acid.hs
+++ b/tools/acid-migrate/Acid.hs
@@ -19,7 +19,8 @@ import Data.SafeCopy        (SafeCopy, base, deriveSafeCopy)
 import Data.Text            (Text, pack)
 import Data.Text.Lazy       (toStrict)
 import Data.Time
-import Happstack.Server hiding (Session)
+import           System.Environment(getEnv)
+
 
 import qualified Crypto.Hash.SHA512 as SHA (hash)
 import qualified Data.ByteString.Char8 as B
@@ -256,7 +257,8 @@ pasteToDB acid !e = update' acid (InsertEntry e)
 
 main :: IO()
 main = do
-    bracket (openLocalState initialBlogState)
+    tbDir <- getEnv "TAZBLOG"
+    bracket (openLocalStateFrom (tbDir ++ "/BlogState") initialBlogState)
             (createCheckpointAndClose)
             (\acid -> convertEntries acid)