plugin: fix crash when lower_case_path isn't set
This commit is contained in:
parent
53bc2ceb66
commit
6fdf040975
|
@ -95,10 +95,12 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean LowerCasePath {
|
public bool PathUsesLowerCase {
|
||||||
get {
|
get {
|
||||||
if (GetValue ("info", "lower_case_path").Equals ("true"))
|
string uses_lower_case = GetValue ("path", "uses_lower_case");
|
||||||
return true;
|
|
||||||
|
if (!string.IsNullOrEmpty (uses_lower_case))
|
||||||
|
return uses_lower_case.Equals (bool.TrueString);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,7 +316,7 @@ namespace SparkleShare {
|
||||||
remote_path = remote_path.Trim ();
|
remote_path = remote_path.Trim ();
|
||||||
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
|
remote_path = remote_path.TrimEnd ("/".ToCharArray ());
|
||||||
|
|
||||||
if (SelectedPlugin.LowerCasePath)
|
if (SelectedPlugin.PathUsesLowerCase)
|
||||||
remote_path = remote_path.ToLower ();
|
remote_path = remote_path.ToLower ();
|
||||||
|
|
||||||
SyncingFolder = Path.GetFileNameWithoutExtension (remote_path);
|
SyncingFolder = Path.GetFileNameWithoutExtension (remote_path);
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
<_description>Free code hosting for Git and Mercurial</_description>
|
<_description>Free code hosting for Git and Mercurial</_description>
|
||||||
<icon>bitbucket.png</icon>
|
<icon>bitbucket.png</icon>
|
||||||
<backend>Git</backend>
|
<backend>Git</backend>
|
||||||
<lower_case_path>true</lower_case_path>
|
|
||||||
</info>
|
</info>
|
||||||
<address>
|
<address>
|
||||||
<value>ssh://git@bitbucket.org/</value>
|
<value>ssh://git@bitbucket.org/</value>
|
||||||
|
@ -15,6 +14,7 @@
|
||||||
<path>
|
<path>
|
||||||
<value></value>
|
<value></value>
|
||||||
<_example>/username/project</_example>
|
<_example>/username/project</_example>
|
||||||
|
<uses_lower_case>True</uses_lower_case>
|
||||||
</path>
|
</path>
|
||||||
</plugin>
|
</plugin>
|
||||||
</sparkleshare>
|
</sparkleshare>
|
||||||
|
|
Loading…
Reference in a new issue