r96375 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96374‎ | r96375 | r96376 >
Date:21:51, 6 September 2011
Author:nelson
Status:reverted (Comments)
Tags:
Comment:
delete now-empty archived thumb directories
Modified paths:
  • /trunk/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalFile.php
@@ -761,6 +761,12 @@
762762 wfRestoreWarnings();
763763 }
764764 }
 765+ if ( is_dir( $dir ) ) {
 766+ wfSuppressWarnings();
 767+ rmdir( $dir ); // Might have already gone away, spews errors if we don't.
 768+ wfRestoreWarnings();
 769+ }
 770+
765771 }
766772
767773 /** purgeDescription inherited */

Follow-up revisions

RevisionCommit summaryAuthorDate
r96392purgeThumbList() needn't always delete all the files in the thumb dirnelson01:09, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96373(bug 30192) Thumbnails of archived images don't get deleted. Patch by Russ an...demon21:01, 6 September 2011

Comments

#Comment by 😂 (talk | contribs)   00:51, 7 September 2011

I already took care of that in purgeOldThumbnails(). I didn't do the same in purgeThumbList() because you don't inherently know that $files is *all* the files in $dir.

#Comment by RussNelson (talk | contribs)   01:06, 7 September 2011

Oh, when *I* wrote purgeThumbList(), I *did* know that $files is *all* the files in $dir. :-) Of course,neither did I document it that way, and who knows, it might be useful to have those semantics, so I'll back that patch out.

#Comment by RussNelson (talk | contribs)   01:10, 7 September 2011

See r96392.

#Comment by 😂 (talk | contribs)   01:12, 7 September 2011

In the future, if you mention the revision you're following up in your commit summary (by saying "r123"), it will automatically link the two and any commenters will be notified.

Status & tagging log