File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ public function createFromSplFileInfo(SplFileInfo $splFileInfo): FileInterface
3535 {
3636 $ deletable = true ;
3737 if (true === $ splFileInfo ->isDir ()) {
38- $ deletable = 0 >= (new Finder ())->in ($ splFileInfo ->getRealPath ())->files ()->count ();
38+ $ deletable = 0 >= (new Finder ())->in ($ splFileInfo ->getRealPath ())->depth ( 0 )-> files ()->count ();
3939 }
4040
4141 $ file = new File ();
4242 $ file ->setName ($ splFileInfo ->getFilename ());
4343 $ file ->setType ($ splFileInfo ->isDir () ? FileInterface::TYPE_FOLDER : $ this ->fileMetadataResolver ->getType ($ splFileInfo ->getRealPath ()));
4444 $ file ->setMimeType ($ splFileInfo ->isDir () ? null : $ this ->fileMetadataResolver ->getMimeType ($ splFileInfo ->getRealPath ()));
45- $ file ->setlink ($ splFileInfo ->isDir () ? ($ splFileInfo ->getRealPath () ?: null ) : null );
45+ $ file ->setLink ($ splFileInfo ->isDir () ? ($ splFileInfo ->getRealPath () ?: null ) : null );
4646 $ file ->setPath ($ this ->filePathResolver ->getRelativeFilePath ($ splFileInfo ->getRealPath ()));
4747 $ file ->setDeletable ($ deletable );
4848 $ file ->setSelectable (!$ splFileInfo ->isDir ());
You can’t perform that action at this time.
0 commit comments