dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7613c75
)
Per comments on r88145: unlink file if it is broken
author
Bryan Tong Minh
<btongminh@users.mediawiki.org>
Fri, 17 Jun 2011 16:48:42 +0000
(16:48 +0000)
committer
Bryan Tong Minh
<btongminh@users.mediawiki.org>
Fri, 17 Jun 2011 16:48:42 +0000
(16:48 +0000)
includes/Import.php
patch
|
blob
|
history
diff --git
a/includes/Import.php
b/includes/Import.php
index
3a2c19c
..
73a15d5
100644
(file)
--- a/
includes/Import.php
+++ b/
includes/Import.php
@@
-1153,6
+1153,10
@@
class WikiRevision {
}
$sha1 = $this->getSha1();
if ( $sha1 && ( $sha1 !== sha1_file( $source ) ) ) {
+ if ( $flags & File::DELETE_SOURCE ) {
+ # Broken file; delete it if it is a temporary file
+ unlink( $source );
+ }
wfDebug( __METHOD__ . ": Corrupt file $source.\n" );
return false;
}