Skip to content

Commit b0b05d3

Browse files
author
Teppo Koivula
committed
Fixes for path renaming
1 parent 6e239ed commit b0b05d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ComposerInstaller/SiteProfileInstaller.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
4343
$path = $this->getInstallPath($package);
4444
$site = $this->getNestedSiteDirectoryName($path);
4545
if ($site) {
46+
$basePath = $this->getBasePath(static::BASE_PATH);
47+
$tempPath = $basePath . 'temp-' . basenname($path);
4648
$filesystem = new Filesystem();
47-
$filesystem->rename($path, 'temp-' . $path);
48-
$filesystem->rename('temp-' . $path . $site, $this->getBasePath(static::BASE_PATH) . $site);
49-
$filesystem->remove('temp-' . $path);
49+
$filesystem->rename($path, $tempPath);
50+
$filesystem->rename($tempPath . '/' . $site, $basePath . $site);
51+
$filesystem->remove($tempPath);
5052
}
5153
}
5254

0 commit comments

Comments
 (0)