Skip to content

Fetching file listing using quatations doesn't work #7

Open

Description

@vekakela

Fetching file listing using quatations doesn't seem to work (ie. if i try to list files in a folder that has spaces in the folder name):
ls "/home/username/Test folder"

This doesn't work:
$files = $this->Ftp->find('all', array('conditions' => array('path' => '"/home/username/Test folder"')));
and neither does this:
$files = $this->Ftp->find('all', array('conditions' => array('path' => '/home/username/Test folder')));

I could preformat the folder path to this:
/home/username/Test\ folder
but I prefer using the quatations, so I fixed the problem by changing the code in ftp_source.php from this:
$raw = $this->config['connection']->exec($cmd.$path);
to this by adding quatations around folder path:
$raw = $this->config['connection']->exec($cmd.'"'.$path.'"');
so that quatations are always placed around folder path.

Activity

  1. dereuromark commented on Jan 22, 2015

    @dereuromark
    Contributor

    Is this still an issue?

  2. added this to the 2.x milestone on Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions