diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs
index a68cc8cb..fed5778d 100755
--- a/SparkleLib/Git/SparkleRepoGit.cs
+++ b/SparkleLib/Git/SparkleRepoGit.cs
@@ -71,7 +71,7 @@ namespace SparkleLib {
public override double Size {
get {
- string file_path = Path.Combine (LocalPath, ".git", "repo_size");
+ string file_path = new string [] {LocalPath, ".git", "repo_size"}.Combine();
try {
return double.Parse (File.ReadAllText (file_path));
@@ -85,7 +85,7 @@ namespace SparkleLib {
public override double HistorySize {
get {
- string file_path = Path.Combine (LocalPath, ".git", "repo_history_size");
+ string file_path = new string [] {LocalPath, ".git", "repo_history_size"}.Combine();
try {
return double.Parse (File.ReadAllText (file_path));
@@ -103,10 +103,10 @@ namespace SparkleLib {
new DirectoryInfo (LocalPath));
double history_size = CalculateSize (
- new DirectoryInfo (Path.Combine (LocalPath, ".git")));
+ new DirectoryInfo (new string [] {LocalPath, ".git"}.Combine() ));
- string size_file_path = Path.Combine (LocalPath, ".git", "repo_size");
- string history_size_file_path = Path.Combine (LocalPath, ".git", "repo_history_size");
+ string size_file_path = new string [] {LocalPath, ".git", "repo_size"}.Combine();
+ string history_size_file_path = new string [] {LocalPath, ".git", "repo_history_size"}.Combine();
File.WriteAllText (size_file_path, size.ToString ());
File.WriteAllText (history_size_file_path, history_size.ToString ());
diff --git a/SparkleLib/Makefile.am b/SparkleLib/Makefile.am
index 3dd3ac2f..502e3a6f 100755
--- a/SparkleLib/Makefile.am
+++ b/SparkleLib/Makefile.am
@@ -3,6 +3,7 @@ TARGET = library
SOURCES = \
Defines.cs \
+ SparkleExtensions.cs \
Git/SparkleFetcherGit.cs \
Git/SparkleGit.cs \
Git/SparkleRepoGit.cs \
diff --git a/SparkleLib/SparkleExtensions.cs b/SparkleLib/SparkleExtensions.cs
new file mode 100755
index 00000000..38e30e0a
--- /dev/null
+++ b/SparkleLib/SparkleExtensions.cs
@@ -0,0 +1,35 @@
+// SparkleShare, a collaboration and sharing tool.
+// Copyright (C) 2010 Hylke Bons (hylkebons@gmail.com)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see (http://www.gnu.org/licenses/).
+
+
+using System;
+using System.IO;
+
+namespace SparkleLib {
+
+ public static class Extensions {
+
+ public static string Combine (this String [] parts)
+ {
+ string new_path = "";
+
+ foreach (string part in parts)
+ new_path = Path.Combine (new_path, part);
+
+ return new_path;
+ }
+ }
+}
diff --git a/SparkleLib/SparkleLib.csproj b/SparkleLib/SparkleLib.csproj
index a0ac9494..1c708116 100755
--- a/SparkleLib/SparkleLib.csproj
+++ b/SparkleLib/SparkleLib.csproj
@@ -49,6 +49,7 @@
+