wfMkdirParents: recover from mkdir race condition
authorElliott Eggleston <ejegg@ejegg.com>
Thu, 12 Sep 2013 22:55:45 +0000 (18:55 -0400)
committerParent5446 <tylerromeo@gmail.com>
Thu, 12 Sep 2013 23:43:45 +0000 (23:43 +0000)
commitf0ea8fdfb9a2976cd9148c7403ee9639cf9b6358
treebeda8fc40baa37fdf3f5f41611d6b999e2de36ab
parent89a14237e288382d86bf8505306569c75bb012e5
wfMkdirParents: recover from mkdir race condition

If mkdir fails, check again to see if dir has been created
since our initial check, and return true if so.

Also, in initial check, only return true if $dir is really
a directory, not a file.

Bug: 49391
Change-Id: I2b331669fae70948ce79ba1477c05968a3095c3d
includes/GlobalFunctions.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php