using the number of writen bytes as indicator if streamCopy() was successfully. Instead check if fwrite returns the number of bytes or false
return both, count and result if the operation succeeded or failed. Maybe in some cases it is useful to know how much bytes where copied
put value assignment into brackets
Merge pull request #1856 from owncloud/fix_error_handling_stream_copy

don't use the number of written bytes as indicator if streamCopy() was successful