Fix: Mask changed on wrong file

This commit is contained in:
Laurent Destailleur 2010-10-05 23:27:09 +00:00
parent d674809e26
commit bb7aa48698

View File

@ -384,7 +384,7 @@ function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1)
//$result=copy($srcfile, $destfile); // To see errors, remove @
if (! $result) dol_syslog("files.lib.php::dol_copy failed", LOG_WARNING);
if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
@chmod($newpathofsrcfile, octdec($newmask));
@chmod($newpathofdestfile, octdec($newmask));
}
return $result;