File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/code/Magento/RemoteStorage/Driver/Adapter Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 8
8
namespace Magento \RemoteStorage \Driver \Adapter ;
9
9
10
10
use League \Flysystem \FilesystemAdapter ;
11
+ use League \Flysystem \FilesystemException ;
12
+ use League \Flysystem \UnableToRetrieveMetadata ;
11
13
use Magento \RemoteStorage \Driver \Adapter \Cache \CacheInterface ;
12
14
13
15
/**
@@ -48,7 +50,11 @@ public function getMetadata(string $path): array
48
50
if ($ metadata && is_array ($ metadata ) && ($ metadata ['type ' ] == 'dir ' || $ this ->isMetadataComplete ($ metadata ))) {
49
51
return $ metadata ;
50
52
}
51
- $ meta = $ this ->adapter ->lastModified ($ path );
53
+ try {
54
+ $ meta = $ this ->adapter ->lastModified ($ path );
55
+ } catch (\InvalidArgumentException | FilesystemException $ e ) {
56
+ throw UnableToRetrieveMetadata::lastModified ($ path , $ e ->getMessage (), $ e );
57
+ }
52
58
$ data = [
53
59
'path ' => $ path ,
54
60
'type ' => $ meta ->type (),
You can’t perform that action at this time.
0 commit comments