Cleans temp files produced during Pdf generation
This commit is contained in:
parent
c1bb7a1dce
commit
cf81e8308f
1 changed files with 3 additions and 0 deletions
|
|
@ -132,6 +132,7 @@ namespace Yavsc.Helpers
|
|||
p.StartInfo.WorkingDirectory = tempdir;
|
||||
p.StartInfo = new ProcessStartInfo();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.WorkingDirectory = tempdir;
|
||||
p.StartInfo.FileName = "/usr/bin/texi2pdf";
|
||||
p.StartInfo.Arguments = $"--batch --build-dir=. -o {fo.FullName} {fi.FullName}";
|
||||
p.Start();
|
||||
|
|
@ -142,6 +143,8 @@ namespace Yavsc.Helpers
|
|||
}
|
||||
}
|
||||
fi.Delete();
|
||||
var di = new DirectoryInfo(Path.Combine(tempdir,$"{Model.BaseFileName}.t2d"));
|
||||
di.Delete(true);
|
||||
}
|
||||
Model.Generated = fo.Exists;
|
||||
Model.GenerationErrorMessage = new HtmlString(errorMsg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue