diff --git a/src/Command/ElFinderInstallerCommand.php b/src/Command/ElFinderInstallerCommand.php
index 8612189..9369f64 100644
--- a/src/Command/ElFinderInstallerCommand.php
+++ b/src/Command/ElFinderInstallerCommand.php
@@ -47,7 +47,7 @@ protected function configure(): void
Where to install elfinder
php %command.full_name% --docroot=public_html
EOF
- );
+ );
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -61,12 +61,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$publicDir = sprintf('%s/%s/bundles/fmelfinder', $rootDir, $dr);
+ $reflection = new \ReflectionClass(\Composer\Autoload\ClassLoader::class);
+ $vendorRootDir = dirname($reflection->getFileName(), 3);
+
$io->note(sprintf('Starting to install elfinder to %s folder', $publicDir));
- $this->fileSystem->mirror($rootDir.'/'.self::ELFINDER_CSS_DIR, $publicDir.'/css');
- $this->fileSystem->mirror($rootDir.'/'.self::ELFINDER_IMG_DIR, $publicDir.'/img');
- $this->fileSystem->mirror($rootDir.'/'.self::ELFINDER_JS_DIR, $publicDir.'/js');
- $this->fileSystem->mirror($rootDir.'/'.self::ELFINDER_SOUNDS_DIR, $publicDir.'/sounds');
+ $this->fileSystem->mirror($vendorRootDir.'/'.self::ELFINDER_CSS_DIR, $publicDir.'/css');
+ $this->fileSystem->mirror($vendorRootDir.'/'.self::ELFINDER_IMG_DIR, $publicDir.'/img');
+ $this->fileSystem->mirror($vendorRootDir.'/'.self::ELFINDER_JS_DIR, $publicDir.'/js');
+ $this->fileSystem->mirror($vendorRootDir.'/'.self::ELFINDER_SOUNDS_DIR, $publicDir.'/sounds');
$io->success('elFinder assets successfully installed');