[Snap Framework] snap-core branch, master, updated. e823126e592e194940892406337d9226673a36e2

noreply at snapframework.com noreply at snapframework.com
Sat Dec 11 09:03:13 CST 2010


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-core".

The branch, master has been updated
       via  e823126e592e194940892406337d9226673a36e2 (commit)
      from  3f3b34b1f490c24df5d1bf2c70f3b914ae522216 (commit)


Summary of changes:
 src/Snap/Util/FileServe.hs |    4 +---
 1 files changed, 1 insertions(+), 3 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 e823126e592e194940892406337d9226673a36e2
Author: Mighty Byte <mightybyte at gmail.com>
Date:   Sat Dec 11 10:03:03 2010 -0500

    Simplified the last commit.

diff --git a/src/Snap/Util/FileServe.hs b/src/Snap/Util/FileServe.hs
index 11c94e0..79b064c 100644
--- a/src/Snap/Util/FileServe.hs
+++ b/src/Snap/Util/FileServe.hs
@@ -172,9 +172,7 @@ getSafePath = do
     req <- getRequest
     let mp = urlDecode $ rqPathInfo req
 
-    when (isNothing mp) pass
-
-    let p = maybe "" S.unpack mp
+    p <- maybe pass (return . S.unpack) mp
 
     -- relative paths only!
     when (not $ isRelative p) pass
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-core


More information about the Snap mailing list