Update gestione path relativo x tmp...

This commit is contained in:
Samuele E. Locatelli
2019-11-30 11:04:21 +01:00
parent 0e8a044185
commit 92bfd5a12a
4 changed files with 6 additions and 5 deletions
@@ -97,13 +97,13 @@ namespace CMS_SC.WebUserControls
byte[] bytes = localReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamIds, out warnings);
// se è un percorso virtuale faccio mapPath...
string FilePath = "";
if (outFilePath.IndexOf("/") < 0)
if (Path.IsPathRooted(outFilePath))
{
FilePath = Server.MapPath(outFilePath);
FilePath = outFilePath;
}
else
{
FilePath = outFilePath;
FilePath = Server.MapPath(outFilePath);
}
using (FileStream fs = new FileStream(FilePath, FileMode.Create))
{