File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -306,6 +306,7 @@ public function vfUpdate()
306306 {
307307 try {
308308 $ rootFolder = $ this ->driverFile ->getRealPath ($ this ->dir ->getRoot ());
309+ $ pubFolder = $ this ->driverFile ->getRealPath ($ this ->dir ->getPath ('pub ' ));
309310 $ moduleDir = $ this ->moduleReader ->getModuleDir (
310311 \Magento \Framework \Module \Dir::MODULE_VIEW_DIR ,
311312 'Vuefront_Vuefront '
@@ -315,9 +316,15 @@ public function vfUpdate()
315316 $ moduleDir . '/adminhtml/web/js/download.tar ' ,
316317 $ this ->driverFile ->fileGetContents ($ this ->request ->getBodyParams ()['url ' ])
317318 );
318- $ this ->file ->rmdirRecursive ($ rootFolder . '/vuefront ' );
319+ if (strpos ($ this ->request ->getServerValue ("SERVER_SOFTWARE " ), "Apache " ) !== false ) {
320+ $ this ->file ->rmdirRecursive ($ rootFolder . '/vuefront ' );
321+
322+ $ this ->arhiveTar ->unpack ($ moduleDir . '/adminhtml/web/js/download.tar ' , $ rootFolder . '/vuefront// ' );
323+ } else {
324+ $ this ->file ->rmdirRecursive ($ pubFolder . '/vuefront ' );
319325
320- $ this ->arhiveTar ->unpack ($ moduleDir . '/adminhtml/web/js/download.tar ' , $ rootFolder . '/vuefront// ' );
326+ $ this ->arhiveTar ->unpack ($ moduleDir . '/adminhtml/web/js/download.tar ' , $ pubFolder . '/vuefront// ' );
327+ }
321328
322329 $ this ->file ->rm ($ moduleDir . '/adminhtml/web/js/download.tar ' );
323330 } catch (\Exception $ e ) {
You can’t perform that action at this time.
0 commit comments