filebackend: optimize the chmod() calls in FSFileBackend
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 7 Sep 2019 05:58:29 +0000 (22:58 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 7 Sep 2019 22:02:10 +0000 (22:02 +0000)
commit28a23740d89cf8aa1bcca7cde04366477e543de8
tree38669194a3353335af092f2359142e93436031cc
parent2083ba21997bc214c34a5a1edbeef61b0cb98981
filebackend: optimize the chmod() calls in FSFileBackend

Bypass the calls in Windows to avoid the stat overhead. The file system
will almost always be NTFS, in which case it can't do anything since the
ACL model is totally different than that of Unix.

Add chmod calls to the existing command in FSFileOpHandle rather than
doing them all serially afterwards.

Use AtEase class for more simple error suppression cases.

Change-Id: Ib4fae9a1bf64c1a9dfde8debe724556633a5532c
includes/libs/filebackend/FSFileBackend.php