invites: use new url scheme on all platforms. #1283

This commit is contained in:
Hylke Bons 2013-05-26 13:18:23 +01:00
parent a6de29a983
commit 9dc04e84c9
3 changed files with 3 additions and 5 deletions

View file

@ -3,5 +3,5 @@ Type=Application
Name=SparkleShareInviteOpener Name=SparkleShareInviteOpener
Exec=sparkleshare open %U Exec=sparkleshare open %U
Terminal=false Terminal=false
MimeType=application/x-sparkleshare;x-scheme-handler/sparkleshare;application/x-sparkleshare-unsafe;x-scheme-handler/sparkleshare-unsafe; MimeType=application/x-sparkleshare;x-scheme-handler/sparkleshare;
NoDisplay=true NoDisplay=true

View file

@ -63,8 +63,7 @@ case $1 in
;; ;;
open|--open) open|--open)
invite=`date -u +%N` invite=`date -u +%N`
open=`echo $2 | sed s/sparkleshare:/https:/` open=`echo $2 | sed s/sparkleshare:\/\/addProject//`
open=`echo $open | sed s/sparkleshare-unsafe:/http:/`
curl --insecure --output ~/SparkleShare/$invite.xml $open curl --insecure --output ~/SparkleShare/$invite.xml $open
;; ;;
*) *)

View file

@ -37,8 +37,7 @@ namespace SparkleShare {
string xml = ""; string xml = "";
// Windows sometimes doesn't strip off protocol handlers // Windows sometimes doesn't strip off protocol handlers
url = url.Replace ("sparkleshare-unsafe:", ""); url = url.Replace ("sparkleshare://addProject/", "");
url = url.Replace ("sparkleshare:", "");
WebClient web_client = new WebClient (); WebClient web_client = new WebClient ();