zf1-future
zf1-future copied to clipboard
_isPathWriteable giving error: The given destination is not writable
Sometimes when multiple file transfers take place in parallel, an error may arise saying The given destination is not writable
. It appears that in the _isPathWriteable
function of Zend/File/Transfer/Adapter/Abstract.php
, the $tempFile .= '/' . 'test.1';
is rather limiting. Multiple transfers may have tried to write text.1
at the same time, resulting in the error. Perhaps some randomness like $tempFile .= '/' . 'test.'.mt_rand(1, 1000);
should be use instead to avoid the chance of collision.