From 8fd5974cadbc99743ed7cd7d31c049aa7343a225 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 6 Jan 2013 19:33:55 +0100 Subject: [PATCH] Revert "Update from using AbsolutePath to LocalPath for all uris, fix some uri path combining." This reverts commit b2b49012c147ad626638b8bd9ae33e51ba268730. Conflicts: SparkleShare/SparkleControllerBase.cs --- SparkleLib/Defines.cs | 4 ++-- SparkleLib/Git/SparkleFetcherGit.cs | 14 +++++++------- SparkleLib/SparkleFetcherBase.cs | 4 ++-- SparkleShare/SparkleControllerBase.cs | 2 +- SparkleShare/SparkleSetupController.cs | 2 +- SparkleShare/Windows/SparkleShare.wxs | 2 +- configure.ac | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/SparkleLib/Defines.cs b/SparkleLib/Defines.cs index 5244628d..037291a4 100644 --- a/SparkleLib/Defines.cs +++ b/SparkleLib/Defines.cs @@ -19,13 +19,13 @@ using System; using System.Reflection; [assembly:AssemblyTitle ("SparkleLib")] -[assembly:AssemblyVersion ("1.0.0")] +[assembly:AssemblyVersion ("1.1.0")] [assembly:AssemblyCopyright ("Copyright (c) 2010 Hylke Bons and others")] [assembly:AssemblyTrademark ("SparkleShare is a trademark of SparkleShare Ltd.")] namespace SparkleLib { public class Defines { - public const string INSTALL_DIR = "/usr/share/sparkleshare"; + public const string INSTALL_DIR = "/usr/local/share/sparkleshare"; } } diff --git a/SparkleLib/Git/SparkleFetcherGit.cs b/SparkleLib/Git/SparkleFetcherGit.cs index 338d4b28..5284fee5 100755 --- a/SparkleLib/Git/SparkleFetcherGit.cs +++ b/SparkleLib/Git/SparkleFetcherGit.cs @@ -78,17 +78,17 @@ namespace SparkleLib.Git { } if (uri.Host.Equals ("gitorious.org") && !uri.Scheme.StartsWith ("http")) { - if (!uri.LocalPath.Equals ("/") && - !uri.LocalPath.EndsWith (".git")) { + if (!uri.AbsolutePath.Equals ("/") && + !uri.AbsolutePath.EndsWith (".git")) { - uri = new Uri (Path.Combine( "ssh://git@gitorious.org", uri.LocalPath, ".git")); + uri = new Uri ("ssh://git@gitorious.org" + uri.AbsolutePath + ".git"); } else { - uri = new Uri (Path.Combine ("ssh://git@gitorious.org", uri.LocalPath)); + uri = new Uri ("ssh://git@gitorious.org" + uri.AbsolutePath); } } else if (uri.Host.Equals ("github.com") && !uri.Scheme.StartsWith ("http")) { - uri = new Uri (Path.Combine("ssh://git@github.com", uri.LocalPath)); + uri = new Uri ("ssh://git@github.com" + uri.AbsolutePath); } else if (uri.Host.Equals ("bitbucket.org") && !uri.Scheme.StartsWith ("http")) { // Nothing really @@ -96,9 +96,9 @@ namespace SparkleLib.Git { } else { if (string.IsNullOrEmpty (uri.UserInfo) && !uri.Scheme.StartsWith ("http")) { if (uri.Port == -1) - uri = new Uri (Path.Combine (uri.Scheme + "://storage@" + uri.Host, uri.LocalPath)); + uri = new Uri (uri.Scheme + "://storage@" + uri.Host + uri.AbsolutePath); else - uri = new Uri (Path.Combine (uri.Scheme + "://storage@" + uri.Host + ":" + uri.Port, uri.LocalPath)); + uri = new Uri (uri.Scheme + "://storage@" + uri.Host + ":" + uri.Port + uri.AbsolutePath); } this.use_git_bin = false; // TODO diff --git a/SparkleLib/SparkleFetcherBase.cs b/SparkleLib/SparkleFetcherBase.cs index 93afae21..8c2139e2 100755 --- a/SparkleLib/SparkleFetcherBase.cs +++ b/SparkleLib/SparkleFetcherBase.cs @@ -165,7 +165,7 @@ namespace SparkleLib { IsActive = false; - bool repo_is_encrypted = (RemoteUrl.LocalPath.Contains ("-crypto") || + bool repo_is_encrypted = (RemoteUrl.AbsolutePath.Contains ("-crypto") || RemoteUrl.Host.Equals ("sparkleshare.net")); Finished (repo_is_encrypted, IsFetchedRepoEmpty, Warnings); @@ -225,7 +225,7 @@ namespace SparkleLib { n + "Have fun! :)" + n; - if (RemoteUrl.LocalPath.Contains ("-crypto") || RemoteUrl.Host.Equals ("sparkleshare.net")) + if (RemoteUrl.AbsolutePath.Contains ("-crypto") || RemoteUrl.Host.Equals ("sparkleshare.net")) text = text.Replace ("a SparkleShare repository", "an encrypted SparkleShare repository"); File.WriteAllText (file_path, text); diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index 2c7ad33f..a3db9197 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -641,7 +641,7 @@ namespace SparkleShare { this.watcher.EnableRaisingEvents = false; this.fetcher.Complete (); - string canonical_name = Path.GetFileName (this.fetcher.RemoteUrl.LocalPath); + string canonical_name = Path.GetFileName (this.fetcher.RemoteUrl.AbsolutePath); canonical_name = canonical_name.Replace ("-crypto", ""); canonical_name = canonical_name.Replace ("_", " "); diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 611f2185..9c77ffe1 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -392,7 +392,7 @@ namespace SparkleShare { Uri uri = new Uri (remote_url); try { - string address = uri.ToString ().Replace (uri.LocalPath, ""); + string address = remote_url.Replace (uri.AbsolutePath, ""); new_plugin = SparklePlugin.Create (uri.Host, address, address, "", "", "/path/to/project"); diff --git a/SparkleShare/Windows/SparkleShare.wxs b/SparkleShare/Windows/SparkleShare.wxs index fb9f0e6e..ad1ef624 100644 --- a/SparkleShare/Windows/SparkleShare.wxs +++ b/SparkleShare/Windows/SparkleShare.wxs @@ -2,7 +2,7 @@ + Language='1033' Codepage='1252' Version='1.1.0' Manufacturer='SparkleShare'> diff --git a/configure.ac b/configure.ac index 4a24b905..863be567 100755 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -m4_define([sparkleshare_version], [1.0.0]) +m4_define([sparkleshare_version], [1.1.0]) AC_PREREQ([2.54]) AC_INIT([SparkleShare], sparkleshare_version)