public void CopyTheme(string tenant)
{
string source = this.ExtractedDirectory;
string destination =
HostingEnvironment.MapPath(
$"~/Tenants/{tenant}/Areas/Frapid.WebsiteBuilder/Themes/{this.ThemeInfo.ThemeName}");
if (destination == null)
{
Log.Warning("Could not copy theme because the destination directory could not be located.");
throw new ThemeInstallException("Could not install theme. Check application logs for more information.");
}
if (Directory.Exists(destination))
{
throw new ThemeInstallException("Could not install theme because it already exists.");
}
FileHelper.CopyDirectory(source, destination);
}