Refresh metodi controllo filepath x evitare errori...
This commit is contained in:
Vendored
+1
-1
@@ -11,7 +11,7 @@ pipeline {
|
||||
steps {
|
||||
/* calcolo numero versione... diverso x branch MASTER/DEVELOP */
|
||||
script {
|
||||
withEnv(['NEXT_BUILD_NUMBER=701']) {
|
||||
withEnv(['NEXT_BUILD_NUMBER=702']) {
|
||||
// env.versionNumber = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true)
|
||||
env.versionNumber = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
env.versionNumberBeta = VersionNumber(versionNumberString : '3.5.${BUILD_DATE_FORMATTED, "yyMM"}-beta.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}')
|
||||
|
||||
@@ -102,14 +102,30 @@ namespace SteamWare
|
||||
private FileInfo getFileInfoByName(string _nomeFile)
|
||||
{
|
||||
FileInfo _fi;
|
||||
try
|
||||
// se nomefile contiene "/" --> faccio mappath altrimenti è percorso fisico...
|
||||
if (_nomeFile.IndexOf("/") >= 0)
|
||||
{
|
||||
_fi = new FileInfo(System.Web.HttpContext.Current.Server.MapPath(_workPath + "\\" + _nomeFile));
|
||||
try
|
||||
{
|
||||
_fi = new FileInfo(System.Web.HttpContext.Current.Server.MapPath(_workPath + "\\" + _nomeFile));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in recupero info file:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
_fi = new FileInfo(_workPath + "\\" + _nomeFile);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in recupero info file:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
_fi = new FileInfo(_workPath + "\\" + _nomeFile);
|
||||
try
|
||||
{
|
||||
_fi = new FileInfo(_nomeFile);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("Errore in recupero info file:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
|
||||
_fi = new FileInfo(_workPath + "\\" + _nomeFile);
|
||||
}
|
||||
}
|
||||
return _fi;
|
||||
}
|
||||
@@ -420,7 +436,14 @@ namespace SteamWare
|
||||
fatto = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (fatto)
|
||||
{
|
||||
logger.lg.scriviLog($"Eliminazione file {_nomeFile} eseguita");
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog($"impossibile Eliminare il file {_nomeFile}");
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user