server/lib/private/files
Lukas Reschke 13e817e901 Throw exception on getPath if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
..
cache don't move files in cache twice, fixes renaming for objectstores 2015-10-16 21:41:51 +02:00
config handle invalid results from mount providers 2015-06-29 14:42:34 +02:00
mount deduplicate @xenopathic 2015-10-06 09:52:19 +02:00
node fix internal path when searching in storage root 2015-10-06 15:54:17 +02:00
objectstore fix objectstore files having create permissions 2015-10-16 21:41:51 +02:00
storage Remove $ETagFunction - it was never used 2015-10-16 13:17:12 +02:00
stream update licence headers via script 2015-10-05 21:15:52 +02:00
type deduplicate @xenopathic 2015-10-06 09:52:19 +02:00
utils Dont use a transaction in the scanner while using db based locking 2015-10-08 15:29:04 +02:00
fileinfo.php update licence headers via script 2015-10-05 21:15:52 +02:00
filesystem.php Throw exception on getPath if file does not exist 2015-10-25 17:58:21 +01:00
view.php Throw exception on getPath if file does not exist 2015-10-25 17:58:21 +01:00