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 {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue