File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -692,14 +692,14 @@ private function getDownloadedFilePath() {
692692 $ this ->silentLog ('[info] storage location: ' . $ storageLocation );
693693
694694 $ filesInStorageLocation = scandir ($ storageLocation );
695- $ files = array_filter ($ filesInStorageLocation , function ($ path ){
695+ $ files = array_values ( array_filter ($ filesInStorageLocation , function ($ path ){
696696 return $ path !== '. ' && $ path !== '.. ' ;
697- });
697+ })) ;
698698 // only the downloaded archive
699699 if (count ($ files ) !== 1 ) {
700700 throw new \Exception ('There are more files than the downloaded archive in the downloads/ folder. ' );
701701 }
702- return $ storageLocation . '/ ' . $ files [2 ];
702+ return $ storageLocation . '/ ' . $ files [0 ];
703703 }
704704
705705 /**
Original file line number Diff line number Diff line change @@ -575,14 +575,14 @@ private function getDownloadedFilePath() {
575575 $ this ->silentLog ('[info] storage location: ' . $ storageLocation );
576576
577577 $ filesInStorageLocation = scandir ($ storageLocation );
578- $ files = array_filter ($ filesInStorageLocation , function ($ path ){
578+ $ files = array_values ( array_filter ($ filesInStorageLocation , function ($ path ){
579579 return $ path !== '. ' && $ path !== '.. ' ;
580- });
580+ })) ;
581581 // only the downloaded archive
582582 if (count ($ files ) !== 1 ) {
583583 throw new \Exception ('There are more files than the downloaded archive in the downloads/ folder. ' );
584584 }
585- return $ storageLocation . '/ ' . $ files [2 ];
585+ return $ storageLocation . '/ ' . $ files [0 ];
586586 }
587587
588588 /**
You can’t perform that action at this time.
0 commit comments