This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap".

The branch, master has been updated
       via  5e539694f087931619078d52c131b36bd5aefdd2 (commit)
      from  88ffb71b776e5503b0f15f33612686e902454a16 (commit)


Summary of changes:
 src/Snap/Starter.hs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5e539694f087931619078d52c131b36bd5aefdd2
Author: Mighty Byte <[email protected]>
Date:   Wed Oct 6 16:23:28 2010 -0400

    Fixed bug regarding invalid characters in the snap init project name.

diff --git a/src/Snap/Starter.hs b/src/Snap/Starter.hs
index dcb387f..7362bd2 100644
--- a/src/Snap/Starter.hs
+++ b/src/Snap/Starter.hs
@@ -2,6 +2,7 @@
 module Main where
 
 ------------------------------------------------------------------------------
+import           Char
 import           Data.List
 import qualified Data.Text as T
 import           System
@@ -50,9 +51,10 @@ setup projName tDir = do
         if isSuffixOf "foo.cabal" f
           then writeFile (projName ++ ".cabal") (insertProjName $ T.pack c)
           else writeFile f c
+    isNameChar c = isAlphaNum c || c == '-'
     insertProjName c = T.unpack $ T.replace
                            (T.pack "projname")
-                           (T.pack projName) c
+                           (T.pack $ filter isNameChar projName) c
 
 ------------------------------------------------------------------------------
 initProject :: [String] -> IO ()
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to