public bool Extract() { var sanitizedTitle = Path.GetInvalidFileNameChars().Aggregate(Title, (current, c) => current.Replace(c.ToString(), "_")); var dest = Path.Combine(m_extractPath, string.Format("{0} {1} ({2})", Constants.SEWT_Prefix, sanitizedTitle, m_modId.ToString())); MySandboxGame.Log.WriteLineAndConsole(string.Format("Extracting item: '{0}' to: \"{1}\"", m_title, dest)); if (Directory.Exists(m_modPath)) { MyFileSystem.CopyAll(m_modPath, dest); } else { MyZipArchive.ExtractToDirectory(m_modPath, dest); } return(true); }