Merge branch 'vnext' of https://github.com/pazof/yavsc into vnext

* 'vnext' of https://github.com/pazof/yavsc:
  factorise
  me pas supprimer les fichiers temporaires d'une génération Pdf en échec
vnext
Paul Schneider 7 years ago
commit d99f121efb
2 changed files with 8 additions and 5 deletions

@ -154,10 +154,14 @@ namespace Yavsc.Helpers
{ {
errorMsg = $"Pdf generation failed with exit code: {p.ExitCode}"; errorMsg = $"Pdf generation failed with exit code: {p.ExitCode}";
} }
else
{
fi.Delete();
var di = new DirectoryInfo(Path.Combine(tempdir,$"{Model.BaseFileName}.t2d"));
di.Delete(true);
}
} }
fi.Delete();
var di = new DirectoryInfo(Path.Combine(tempdir,$"{Model.BaseFileName}.t2d"));
di.Delete(true);
} }
Model.Generated = fo.Exists; Model.Generated = fo.Exists;
Model.GenerationErrorMessage = new HtmlString(errorMsg); Model.GenerationErrorMessage = new HtmlString(errorMsg);

@ -2,8 +2,7 @@
@if (Model!=null) { @if (Model!=null) {
<div class="userinfo"> <div class="userinfo">
<h3> <h3>@Component.Invoke("Avatar", Model.Id, ".s")
<img src="~/Avatars/@(Model.UserName).s.png" alt="" class="smalltofhol">
@Model.UserName </h3> @Model.UserName </h3>
@if (Model.Posts!=null && Model.Posts.Count()>1) { <a asp-controller="Blogspot" asp-action="UserPosts" @if (Model.Posts!=null && Model.Posts.Count()>1) { <a asp-controller="Blogspot" asp-action="UserPosts"
asp-route-id="@Model.UserName" class="btn btn-primary">@SR["index de ses articles"]</a> asp-route-id="@Model.UserName" class="btn btn-primary">@SR["index de ses articles"]</a>

Loading…