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 @@ -256,7 +256,14 @@ public function extractModule() {
256256 $ this ->tools ->nl ();
257257 $ this ->tools ->writeComment (" Extracting module... \n" );
258258 $ dir = \ProcessWire \wire ('config ' )->paths ->siteModules . $ this ->module ;
259- if (is_dir ($ dir )) chmod ($ dir , 0755 );
259+
260+ if (is_dir ($ dir )) {
261+ $ this ->tools ->writeComment (" Directory ` $ this ->module ` already exists, remaming to '. {$ this ->module }' " );
262+ chmod ($ dir , 0755 );
263+ $ fs = new Filesystem ();
264+ // rename module directory with a dot on front
265+ $ fs ->rename ($ dir , \ProcessWire \wire ('config ' )->paths ->siteModules .'. ' .$ this ->module );
266+ }
260267
261268 $ this ->downloader ->extract ($ this ->compressedFilePath , \ProcessWire \wire ('config ' )->paths ->siteModules . $ this ->module , $ this ->module );
262269
@@ -282,4 +289,4 @@ public function downloadModule($url) {
282289 return $ this ;
283290 }
284291
285- }
292+ }
You can’t perform that action at this time.
0 commit comments