From 7ed39caa93a6d64ede7996897bef6d2e41c8a15b Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 8 Nov 2012 12:34:07 -0700 Subject: [PATCH] Better error messages in planet2 PNS and a fix to the sync script --- collects/meta/planet2-index/official/main.rkt | 14 +++++++++++++- collects/meta/planet2-index/sync.sh | 4 +--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/collects/meta/planet2-index/official/main.rkt b/collects/meta/planet2-index/official/main.rkt index daea39eff8..9e7084a6d0 100644 --- a/collects/meta/planet2-index/official/main.rkt +++ b/collects/meta/planet2-index/official/main.rkt @@ -278,6 +278,15 @@ `(p "Email addresses may not contain / on Planet2:" (tt ,email))))) + (when (string=? "" email) + (send/back + (template + log-req + #:breadcrumb + (list "Login" "Account Registration Error") + `(p "Email addresses must not be empty::" + (tt ,email))))) + (define password-path (build-path users-path email)) (cond @@ -301,7 +310,10 @@ `(p "An email has been sent to " (tt ,email) ", please click the link it contains to register and log in.")))) - (display-to-file (salty passwd) password-path) + + (when (not (file-exists? password-path)) + (display-to-file (salty passwd) password-path)) + (authenticated!)] [(not (bytes=? (string->bytes/utf-8 (salty passwd)) (file->bytes password-path))) diff --git a/collects/meta/planet2-index/sync.sh b/collects/meta/planet2-index/sync.sh index 69176e69b2..ce57b7727d 100755 --- a/collects/meta/planet2-index/sync.sh +++ b/collects/meta/planet2-index/sync.sh @@ -1,11 +1,9 @@ #!/bin/sh for i in planet2 tests/planet2 meta/planet2-index ; do - rsync -n -a --progress -h --delete --exclude root --exclude compiled --exclude doc ../../$i/ plt-etc:local/galaxy/$i/ + rsync -a --progress -h --delete --exclude root --exclude compiled --exclude doc ../../$i/ plt-etc:local/galaxy/$i/ done -exit 1 - for i in official planet-compat ; do rsync -a --progress -h --delete plt-etc:local/galaxy/meta/planet2-index/$i/root/ $i/root/ done