Skip to content

ensureDir should throw on Access Denied during MKD #218

@vicary

Description

@vicary

Describe the bug
Currently running ensureDir I only receive a 550 The system cannot find the file specified. which from the CMD, but when running MKD it is already receiving a 550 Access is Denied. Throwing access denied is much more concise and self explanatory about the actual situation than a file not found error.

Example code

await client.ensureDir("a/b/c/d/e");

Console output

> MKD a
< 550 Access is denied.
> CMD a
< 550 The system cannot find the file specified.

Which version of Node.js are you using?
Node v16.17.1

Additional context
The FTP server is a Microsoft File Server, and is believed to be missing my permission to create folders.

A correct error message would definitely save me an hour of debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions