linux nautilus: Fix 'Copy Web Link' for Github. Closes #800

This commit is contained in:
Hylke Bons 2012-06-23 21:38:59 +01:00
parent 60b9817afe
commit 22453c23a0
2 changed files with 2 additions and 2 deletions

View file

@ -88,7 +88,7 @@ class SparkleShareExtension (nautilus.MenuProvider):
if "gitorious.org" in url:
url = "http://" + url + "/blobs/master" + relative_path
if "github.com" in url:
url = "http://" + url + "/raw/master" + relative_path
url = "https://" + url + "/master" + relative_path
url = url.replace (" ", "%20");

View file

@ -83,7 +83,7 @@ class SparkleShareExtension (GObject.GObject, Nautilus.MenuProvider):
elif "github.com" in host:
# ssh://git@github.com/hbons/SparkleShare.git
# https://raw.github.com/hbons/SparkleShare/master/README
url = "http://raw.github.com/" + urllib.quote(origin_path.rstrip(".git")) + "/raw/master/" + urllib.quote(relative_path)
url = "https://raw.github.com/" + urllib.quote(origin_path.rstrip(".git")) + "/master/" + urllib.quote(relative_path)
else:
# https://git.one-gear.com/?p=thansen/Public.git;a=blob;f=SparkleShare.txt;hb=HEAD
url = "http://" + host + "/?p=" + urllib.quote(origin_path) +";a=blob;f=" + urllib.quote(relative_path) + ";hb=HEAD"