Allow apostrophes and single quotes in folder names, but don't allow double quotes. Fixes #787
This commit is contained in:
parent
1720984e5a
commit
febc13d4f4
|
@ -67,14 +67,12 @@ namespace SparkleLib.Git {
|
|||
!uri.Scheme.Equals ("https") &&
|
||||
!uri.Scheme.Equals ("http")) {
|
||||
|
||||
if (uri.Port == -1) {
|
||||
if (uri.Port == -1)
|
||||
uri = new Uri (uri.Scheme + "://git@" + uri.Host + uri.AbsolutePath);
|
||||
|
||||
} else {
|
||||
else
|
||||
uri = new Uri (uri.Scheme + "://git@" + uri.Host + ":" + uri.Port + uri.AbsolutePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TargetFolder = target_folder;
|
||||
RemoteUrl = uri;
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace SparkleLib {
|
|||
}
|
||||
|
||||
FullPath = Path.Combine (config_path, config_file_name);
|
||||
LogFilePath = Path.Combine (config_path, "debug.log");
|
||||
LogFilePath = Path.Combine (config_path, "debug.txt");
|
||||
|
||||
if (File.Exists (LogFilePath)) {
|
||||
try {
|
||||
|
@ -296,7 +296,7 @@ namespace SparkleLib {
|
|||
|
||||
private XmlNode GetFolder (string name)
|
||||
{
|
||||
return SelectSingleNode (string.Format ("/sparkleshare/folder[name='{0}']", name));
|
||||
return SelectSingleNode (string.Format ("/sparkleshare/folder[name=\"{0}\"]", name));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -384,7 +384,8 @@ namespace SparkleShare {
|
|||
bool fields_valid = (address != null &&
|
||||
address.Trim ().Length > 0 &&
|
||||
remote_path != null &&
|
||||
remote_path.Trim ().Length > 0);
|
||||
remote_path.Trim ().Length > 0 &&
|
||||
!remote_path.Contains ("\""));
|
||||
|
||||
if (UpdateAddProjectButtonEvent != null)
|
||||
UpdateAddProjectButtonEvent (fields_valid);
|
||||
|
|
Loading…
Reference in a new issue