owncloud/core — pull request #5961 by PVince81 (2013-11-20 13:32:39+00:00)
Title: Fixed getLocalFile() condition for x-send-file

Until now, addSendfileHeader() was called even when no x-send-file
headers were set. Even though the method itself doesn't do anything, a
call to getLocalFile() was done and would trigger a full download when
using external storage.

Additionally, the storage resolution code is wrong and always returns
the local storage of the root filesystem, which caused the code to be
run anyway.

This commit fixes both issues.

Note: this will improve the download performance for external storage as it will need one less full file download.

Please review @karlitschek @DeepDiver1975 @schiesbn @icewind1991 @bantu