"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "maintenance/copyFileBackend.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

copyFileBackend.php  (mediawiki-1.31.1):copyFileBackend.php  (mediawiki-1.32.0)
skipping to change at line 340 skipping to change at line 340
* @param string $sPath * @param string $sPath
* @param string $dPath * @param string $dPath
* @return bool * @return bool
*/ */
protected function filesAreSame( FileBackend $src, FileBackend $dst, $sPa th, $dPath ) { protected function filesAreSame( FileBackend $src, FileBackend $dst, $sPa th, $dPath ) {
$skipHash = $this->hasOption( 'skiphash' ); $skipHash = $this->hasOption( 'skiphash' );
$srcStat = $src->getFileStat( [ 'src' => $sPath ] ); $srcStat = $src->getFileStat( [ 'src' => $sPath ] );
$dPathSha1 = sha1( $dPath ); $dPathSha1 = sha1( $dPath );
if ( $this->statCache !== null ) { if ( $this->statCache !== null ) {
// All dst files are already in stat cache // All dst files are already in stat cache
$dstStat = isset( $this->statCache[$dPathSha1] ) $dstStat = $this->statCache[$dPathSha1] ?? false;
? $this->statCache[$dPathSha1]
: false;
} else { } else {
$dstStat = $dst->getFileStat( [ 'src' => $dPath ] ); $dstStat = $dst->getFileStat( [ 'src' => $dPath ] );
} }
// Initial fast checks to see if files are obviously different // Initial fast checks to see if files are obviously different
$sameFast = ( $sameFast = (
is_array( $srcStat ) // sanity check that source exists is_array( $srcStat ) // sanity check that source exists
&& is_array( $dstStat ) // dest exists && is_array( $dstStat ) // dest exists
&& $srcStat['size'] === $dstStat['size'] && $srcStat['size'] === $dstStat['size']
); );
// More thorough checks against files // More thorough checks against files
 End of changes. 1 change blocks. 
3 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)