/// <summary> /// Recover a file that was previously stored /// </summary> /// <param name="name"></param> /// <param name="ch"></param> /// <returns></returns> public static bool RecoverFile(string name, string ch = "unknown object") { try { if (File.Exists(Configuration.TempName(name))) { if (Core.GetTempFileName(name)) { Syslog.Log("Restoring unfinished transaction of " + ch + " for db_" + name); File.Copy(Configuration.TempName(name), name, true); return(true); } Syslog.Log("Unfinished transaction could not be restored! DB of " + name + " is probably broken", true); } return(false); } catch (Exception b) { HandleException(b); Syslog.Log("Unfinished transaction could not be restored! DB of " + name + " is now broken"); return(false); } }