diff --git a/src/Illuminate/Foundation/Console/AppNameCommand.php b/src/Illuminate/Foundation/Console/AppNameCommand.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/Console/AppNameCommand.php
+++ b/src/Illuminate/Foundation/Console/AppNameCommand.php
@@ -155,7 +155,7 @@ class AppNameCommand extends Command
     protected function setComposerNamespace()
     {
         $this->replaceIn(
-            $this->getComposerPath(), $this->currentRoot.'\\\\', str_replace('\\', '\\\\', $this->argument('name')).'\\\\'
+            $this->getComposerPath(), str_replace('\\', '\\\\', $this->currentRoot).'\\\\', str_replace('\\', '\\\\', $this->argument('name')).'\\\\'
         );
     }
Fix AppNameCommand when setting composer namespace (#<I>)