Skip to content

Fetching file listing using quatations doesn't work #7

@vekakela

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions