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:
f866abe
)
Don't move the destination to the archive until we have checked that the source file...
author
Tim Starling
<tstarling@users.mediawiki.org>
Fri, 6 Jul 2007 21:50:43 +0000
(21:50 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Fri, 6 Jul 2007 21:50:43 +0000
(21:50 +0000)
includes/filerepo/FSRepo.php
patch
|
blob
|
history
diff --git
a/includes/filerepo/FSRepo.php
b/includes/filerepo/FSRepo.php
index
a75ba7a
..
dc40444
100644
(file)
--- a/
includes/filerepo/FSRepo.php
+++ b/
includes/filerepo/FSRepo.php
@@
-214,6
+214,11
@@
class FSRepo extends FileRepo {
$dstDir = dirname( $dstPath );
if ( !is_dir( $dstDir ) ) wfMkdirParents( $dstDir );
+ // Check if the source is missing before we attempt to move the dest to archive
+ if ( !is_file( $srcPath ) ) {
+ return new WikiErrorMsg( 'filenotfound', wfEscapeWikiText( $srcPath ) );
+ }
+
if( is_file( $dstPath ) ) {
$archiveDir = dirname( $archivePath );
if ( !is_dir( $archiveDir ) ) wfMkdirParents( $archiveDir );