Development

#3421 (sfFinder->relative does not work with links)

You must first sign up to be able to contribute.

Ticket #3421 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

sfFinder->relative does not work with links

Reported by: dwhittle Assigned to: fabien
Priority: minor Milestone: 1.1.0 RC1
Component: configuration Version: 1.1.0 BETA4
Keywords: finder Cc:
Qualification: Design decision

Description

When sfFinder->relative is used with follow_link, the result is the entire path to the link. This becomes an issue in sfApplicationConfiguration where the entire link path is returned instead of the relative path:

  public function getPluginPaths()
  {
    $pluginPaths = array();

    $finder = sfFinder::type('dir')->maxdepth(0)->follow_link()->relative();

    $projectPlugins = $finder->in(sfConfig::get('sf_plugins_dir'));
    // project plugins
    foreach ($projectPlugins as $plugin)
    {
//      $pluginPaths[] = sfConfig::get('sf_plugins_dir').'/'.$plugin;
      $pluginPaths[] = sfConfig::get('sf_plugins_dir').'/'.basename($plugin); // hack with basename
    }

Change History

05/04/08 13:47:09 changed by fabien

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

(In [8767]) changed sfFinder to return the symlink path instead of the real path (needed when you use ->relative(), and if not, well, it's the same directory anyway - closes #3421)