owncloud/core — pull request #1856 by schiesbn (2013-02-22 14:01:08+00:00)
Title: don't use the number of written bytes as indicator if streamCopy() was successful

Don't use the number of written bytes as indicator if streamCopy() was successful. Instead check if fwrite() returns the number of bytes or false.

This fixes issue #1851 and other potential errors if we streamCopy empty files.