protected virtual void ExportAssets() { foreach (var asset in MSG.Assets) { string dest = Path.Combine(ExportDirectory, MSG.AssetsNameConvision(asset.Value)); REDO: try { MHTCacher.Default.CopyTo(asset.Value, dest); } catch (DirectoryNotFoundException) { string path = Path.GetDirectoryName(dest); Directory.CreateDirectory(path); goto REDO; } } }