plugin: fix crash when lower_case_path isn't set

This commit is contained in:
Hylke Bons 2012-03-25 18:00:54 +01:00
parent 53bc2ceb66
commit 6fdf040975
3 changed files with 7 additions and 5 deletions

View file

@ -95,10 +95,12 @@ namespace SparkleShare {
}
}
public Boolean LowerCasePath {
public bool PathUsesLowerCase {
get {
if (GetValue ("info", "lower_case_path").Equals ("true"))
return true;
string uses_lower_case = GetValue ("path", "uses_lower_case");
if (!string.IsNullOrEmpty (uses_lower_case))
return uses_lower_case.Equals (bool.TrueString);
else
return false;
}

View file

@ -316,7 +316,7 @@ namespace SparkleShare {
remote_path = remote_path.Trim ();
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
if (SelectedPlugin.LowerCasePath)
if (SelectedPlugin.PathUsesLowerCase)
remote_path = remote_path.ToLower ();
SyncingFolder = Path.GetFileNameWithoutExtension (remote_path);

View file

@ -6,7 +6,6 @@
<_description>Free code hosting for Git and Mercurial</_description>
<icon>bitbucket.png</icon>
<backend>Git</backend>
<lower_case_path>true</lower_case_path>
</info>
<address>
<value>ssh://git@bitbucket.org/</value>
@ -15,6 +14,7 @@
<path>
<value></value>
<_example>/username/project</_example>
<uses_lower_case>True</uses_lower_case>
</path>
</plugin>
</sparkleshare>