diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 212fcc6228a..a8b323ec7a6 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -79,7 +79,12 @@ $file_list = array('missing' => array(), 'updated' => array()); // Local file to compare to $xmlshortfile = dol_sanitizeFileName(GETPOST('xmlshortfile', 'alpha') ? GETPOST('xmlshortfile', 'alpha') : 'filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT)); + $xmlfile = DOL_DOCUMENT_ROOT.'/install/'.$xmlshortfile; +if (!preg_match('/\.zip$/i', $xmlfile) && dol_is_file($xmlfile.'.zip')) { + $xmlfile = $xmlfile.'.zip'; +} + // Remote file to compare to $xmlremote = GETPOST('xmlremote', 'alphanohtml'); if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) {