diff --git a/src/Installer/DirectoryRecursiveFilterIterator.php b/src/Installer/DirectoryRecursiveFilterIterator.php
index <HASH>..<HASH> 100644
--- a/src/Installer/DirectoryRecursiveFilterIterator.php
+++ b/src/Installer/DirectoryRecursiveFilterIterator.php
@@ -37,7 +37,7 @@ class DirectoryRecursiveFilterIterator extends RecursiveFilterIterator
     public function accept()
     {
         foreach ($this->directoriesToSkip as $skip) {
-            $skip = preg_quote(trim($skip, '/'), '/');
+            $skip = preg_quote(rtrim($skip, '/'), '/');
             if (preg_match("/^${skip}(\\/|$)/", $this->current()->getPathName())) {
                 return false;
             }
diff --git a/src/Installer/ShopInstaller.php b/src/Installer/ShopInstaller.php
index <HASH>..<HASH> 100644
--- a/src/Installer/ShopInstaller.php
+++ b/src/Installer/ShopInstaller.php
@@ -54,7 +54,7 @@ class ShopInstaller extends AbstractInstaller
     {
         $this->getIO()->write("Installing shop package");
 
-        $packagePath = "$packagePath/source";
+        $packagePath = rtrim($packagePath, '/') . '/source';
         $root = $this->getRootDirectory();
 
         $directoriesToSkip = array_map(
Change shop installer to skip directories with classes from copying