]> source.dussan.org Git - nextcloud-server.git/commit
Fixed quota wrapper to not wrap failed fopen streams
authorVincent Petry <pvince81@owncloud.com>
Sun, 19 Jan 2014 17:49:51 +0000 (18:49 +0100)
committerVincent Petry <pvince81@owncloud.com>
Sun, 19 Jan 2014 17:51:36 +0000 (18:51 +0100)
commit1af7dab5358d7fd495e4382037c6e2528e2b76d5
treed2d27a980780f1f4a68f3b2afc93e8c84486e986
parent903b330cccaad0233274199c9ee8f047478bb72e
Fixed quota wrapper to not wrap failed fopen streams

When calling fopen() on some storage types, these return false instead
of throwing an exception.

This fix makes sure that in case the stream wasn't opened (for example
when a file doesn't exist any more) the stream isn't wrapped.

Also added 'rb' as another case that doesn't need to be wrapped.

Fixes #6832
lib/private/files/storage/wrapper/quota.php
tests/lib/files/storage/wrapper/quota.php