@@ -146,8 +146,8 @@ public function is_file($path) {
146
146
public function stat ($ path ) {
147
147
$ fullPath = $ this ->getSourcePath ($ path );
148
148
clearstatcache (true , $ fullPath );
149
- $ statResult = stat ($ fullPath );
150
- if (PHP_INT_SIZE === 4 && !$ this ->is_dir ($ path )) {
149
+ $ statResult = @ stat ($ fullPath );
150
+ if (PHP_INT_SIZE === 4 && $ statResult && !$ this ->is_dir ($ path )) {
151
151
$ filesize = $ this ->filesize ($ path );
152
152
$ statResult ['size ' ] = $ filesize ;
153
153
$ statResult [7 ] = $ filesize ;
@@ -159,9 +159,7 @@ public function stat($path) {
159
159
* @inheritdoc
160
160
*/
161
161
public function getMetaData ($ path ) {
162
- $ fullPath = $ this ->getSourcePath ($ path );
163
- clearstatcache (true , $ fullPath );
164
- $ stat = @stat ($ fullPath );
162
+ $ stat = $ this ->stat ($ path );
165
163
if (!$ stat ) {
166
164
return null ;
167
165
}
@@ -180,6 +178,7 @@ public function getMetaData($path) {
180
178
}
181
179
182
180
if (!($ path === '' || $ path === '/ ' )) { // deletable depends on the parents unix permissions
181
+ $ fullPath = $ this ->getSourcePath ($ path );
183
182
$ parent = dirname ($ fullPath );
184
183
if (is_writable ($ parent )) {
185
184
$ permissions += Constants::PERMISSION_DELETE ;
0 commit comments