controller: try moving projects from .tmp twice and add more debug output
This commit is contained in:
parent
cdf28e8d20
commit
aae2433741
|
@ -455,7 +455,7 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
private void ClearFolderAttributes (string path)
|
||||
private void ClearDirectoryAttributes (string path)
|
||||
{
|
||||
if (!Directory.Exists (path))
|
||||
return;
|
||||
|
@ -463,7 +463,7 @@ namespace SparkleShare {
|
|||
string [] folders = Directory.GetDirectories (path);
|
||||
|
||||
foreach (string folder in folders)
|
||||
ClearFolderAttributes (folder);
|
||||
ClearDirectoryAttributes (folder);
|
||||
|
||||
string [] files = Directory.GetFiles(path);
|
||||
|
||||
|
@ -652,13 +652,20 @@ namespace SparkleShare {
|
|||
string target_folder_path = Path.Combine (this.config.FoldersPath, target_folder_name);
|
||||
|
||||
try {
|
||||
ClearFolderAttributes (this.fetcher.TargetFolder);
|
||||
Directory.Move (this.fetcher.TargetFolder, target_folder_path);
|
||||
|
||||
} catch (Exception e) {
|
||||
SparkleLogger.LogInfo ("Controller", "Error moving directory: " + e.Message);
|
||||
this.watcher.EnableRaisingEvents = true;
|
||||
return;
|
||||
SparkleLogger.LogInfo ("Controller", "Error moving directory: \"" + e.Message + "\", trying again...");
|
||||
|
||||
try {
|
||||
ClearDirectoryAttributes (this.fetcher.TargetFolder);
|
||||
Directory.Move (this.fetcher.TargetFolder, target_folder_path);
|
||||
|
||||
} catch (Exception x) {
|
||||
SparkleLogger.LogInfo ("Controller", "Error moving directory: " + x.Message);
|
||||
this.watcher.EnableRaisingEvents = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
string backend = SparkleFetcherBase.GetBackend (this.fetcher.RemoteUrl.AbsolutePath);
|
||||
|
|
|
@ -241,7 +241,7 @@ namespace SparkleShare {
|
|||
Program.Controller.OpenWebsite (url);
|
||||
|
||||
} else if (url.StartsWith ("restore://") && this.restore_revision_info == null) {
|
||||
Regex regex = new Regex ("restore://(.+)/([a-f0-9]+)/(.+)/(.{3} [0-9]+ [0-9]+h[0-9]+)/(.+)", RegexOptions.Compiled);
|
||||
Regex regex = new Regex ("restore://(.+)/([a-f0-9]+)/(.+)/(.{3} [0-9]+ [0-9]+h[0-9]+)/(.+)");
|
||||
Match match = regex.Match (url);
|
||||
|
||||
if (match.Success) {
|
||||
|
|
Loading…
Reference in a new issue