Browse Source

Avoid moving the symlink if there is already one

Jordi Boggiano 10 years ago
parent
commit
bfbaedbe7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Packagist/WebBundle/Package/SymlinkDumper.php

+ 1 - 1
src/Packagist/WebBundle/Package/SymlinkDumper.php

@@ -312,7 +312,7 @@ class SymlinkDumper
             }
 
             // move away old files for BC update
-            if ($initialRun && file_exists($webDir.'/p')) {
+            if ($initialRun && file_exists($webDir.'/p') && !is_link($webDir.'/p')) {
                 rename($webDir.'/p', $webDir.'/p-old');
             }