WordPress.org

Make WordPress Core

Ticket #12150: rename.patch

File rename.patch, 275 bytes (added by reaperhulk, 6 years ago)
Line 
1209c209,215
2<               //Possible to use rename()?
3---
4>               if ( ! $overwrite && $this->exists($destination) )
5>                       return false;
6>
7>               //try using rename first.  if that fails (for example, source is read only) try copy
8>               if (@rename($source, $destination))
9>                       return true;
10>