Skip to content

ftpClient mkdir  #13

Open
Open
@ghost

Description

        /*
         * Path is '/srv/clips/1/5/0/5/7/vid/059468/arbm'
         * Explode is
                array (
                  0 => '',
                  1 => 'srv',
                  2 => 'clips',
                  3 => '1',
                  4 => '5',
                  5 => '0',
                  6 => '5',
                  7 => '7',
                  8 => 'vid',
                  9 => '059468',
                  10 => 'arbm',
                )
         */
        foreach ($parts as $part) {
            
            $part = $part=='' ? '/' : $part;
            ...

I had to add the last line, since chdir('') fails.

If I send target without leading slash, it the folder gets created under the current root.

In retrospect it seems obvious: you want me to chdir to '/srv' then mkdir.

But I am calling putAll(), and I don't necessarily know what the root/leading portion is.

Is there any problem with this suggested fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions