mirror of
https://github.com/nextcloud/server.git
synced 2026-02-11 14:54:02 -05:00
Return plausible isReadable() default impl for ext storage
When an ext storage doesn't implement isReadable(), always returning true made the file scanner believe that the file exists and creates a cache entry with the size zero. This fix makes the default impl of isReadable() use file_exists(). Fixes #5940
This commit is contained in:
parent
aeefe48cba
commit
a49e873d3f
1 changed files with 7 additions and 2 deletions
|
|
@ -42,11 +42,16 @@ abstract class StreamWrapper extends Common {
|
|||
}
|
||||
|
||||
public function isReadable($path) {
|
||||
return true; //not properly supported
|
||||
// at least check whether it exists
|
||||
// subclasses might want to implement this more thoroughly
|
||||
return $this->file_exists($path);
|
||||
}
|
||||
|
||||
public function isUpdatable($path) {
|
||||
return true; //not properly supported
|
||||
// at least check whether it exists
|
||||
// subclasses might want to implement this more thoroughly
|
||||
// a non-existing file/folder isn't updatable
|
||||
return $this->file_exists($path);
|
||||
}
|
||||
|
||||
public function file_exists($path) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue