Development

#2609 (Installing a plugin on windows creates a complete app dir under /web)

You must first sign up to be able to contribute.

Ticket #2609 (closed defect: fixed)

Opened 1 year ago

Last modified 9 months ago

Installing a plugin on windows creates a complete app dir under /web

Reported by: op Assigned to: fabien
Priority: minor Milestone: 1.0.12
Component: tasks Version: 1.0.9
Keywords: plugin pake Cc:
Qualification: Unreviewed

Description

Steps to reproduce: run for example

  symfony plugin-install http://plugins.symfony-project.com/sfCssTabsPlugin

In the project's web dir, a sfCssTabsPlugin dir will be created, with all the sub-dirs of a complete symfony project.

As far as I can see, the bug comes from the lines 293 & 294 of sfPakePlugins.php:

$source = split(DIRECTORY_SEPARATOR, rtrim($source, DIRECTORY_SEPARATOR));
$target = split(DIRECTORY_SEPARATOR, rtrim($target, DIRECTORY_SEPARATOR));

On Windows, DIRECTORY_SEPARATOR resolves to '\', so split() gets confused.

The following correction works:

 $source = split('[\\'.DIRECTORY_SEPARATOR.']', rtrim($source, '[\\'.DIRECTORY_SEPARATOR.']'));
  $target = split('[\\'.DIRECTORY_SEPARATOR.']', rtrim($target, '[\\'.DIRECTORY_SEPARATOR.']'));

Change History

12/21/07 00:34:29 changed by lking

didn't seen this ticket erlier. maybe this solution is better, or maybe here need to apply both solutions(#2590). at any way, one from this tickets is duplicate

01/23/08 08:19:40 changed by fabien

  • milestone set to 1.0.12.

01/23/08 11:49:54 changed by develop7

Is split necessary there? Or explode will be more suitable?

01/23/08 11:50:56 changed by develop7

Like there.

03/20/08 18:34:21 changed by noel

  • status changed from new to closed.
  • resolution set to fixed.

(In r8006) fixed plugin-install command on windows