[FileBackend] Cleanup behavior for coping/moving a file over itself.
authorASchulz <aschulz@wikimedia.org>
Wed, 20 Mar 2013 23:25:05 +0000 (16:25 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 26 Mar 2013 00:06:30 +0000 (17:06 -0700)
commitc328cf6401ce100bb1ceb0c0257cd0334c281961
treeb30cac01bb064f76f21aab28a23b1707da229e68
parent0f3d17edd4ef967930b31149123fabaef8276b59
[FileBackend] Cleanup behavior for coping/moving a file over itself.

* Previously, for doQuickOperations(), the default move function
  would just delete the file if it was moved over itself. In fact,
  the php-cloudfiles bindings have this same bug in its move function.
* For both copy and move, when the source and destination are the
  same path, make sure that the headers get updated as specified.
  This only applies for the 'overwrite' case (not 'overwriteSame').
* Fixed bad status for doQuickOperations() when copying a file over
  itself using FSFileBackend.
* Clarified the documentation for 'overwriteSame' option.
* Renamed destSameAsSource to overwriteSameCase in FileOp for clarity.

Change-Id: I3f609d9413795c654de27958b1e807b1fc785f31
includes/filebackend/FSFileBackend.php
includes/filebackend/FileBackend.php
includes/filebackend/FileBackendStore.php
includes/filebackend/FileOp.php
tests/phpunit/includes/filebackend/FileBackendTest.php