altra prova...

This commit is contained in:
Samuele E. Locatelli
2018-03-15 11:44:32 +01:00
parent e40aad1b45
commit 654d9161fb
2 changed files with 12 additions and 8 deletions
@@ -179,25 +179,29 @@ namespace MoonProTablet.WebUserControls
try
{
string filePath = docFilePath(Disegno);
logger.lg.scriviLog(string.Format("FilePath: {0}", filePath), tipoLog.INFO);
fileMover.obj.setDirectory("");
answ = fileMover.obj.fileExist(filePath);
// se non trova provo a sostituire "~/" con "./"
if (!answ)
{
logger.lg.scriviLog(string.Format("FilePath: {0}", filePath.Replace("~/", "./")), tipoLog.INFO);
answ = fileMover.obj.fileExist(filePath.Replace("~/", "./"));
}
// penultima prova...
// altra prova...
if (!answ)
{
logger.lg.scriviLog(string.Format("FilePath: {0}", filePath.Replace("~/", "")), tipoLog.INFO);
answ = fileMover.obj.fileExist(filePath.Replace("~/", ""));
}// penultima prova...
}
// altra prova...
if (!answ)
{
logger.lg.scriviLog(string.Format("FilePath: {0}", filePath.Replace("~/", "e:\\")), tipoLog.INFO);
answ = fileMover.obj.fileExist(filePath.Replace("~/", "e:\\")); // hard coded da evitare...
fileMover.obj.setDirectory(Server.MapPath(""));
answ = fileMover.obj.fileExist(filePath);
}
// altra prova...
if (!answ)
{
fileMover.obj.setDirectory(Server.MapPath(""));
answ = fileMover.obj.fileExist(filePath.Replace("~/", ""));
}
}
catch (Exception exc)