Skip to content

fix: webdav arguments are passed in wrong order#1

Open
darktohka wants to merge 1 commit intoremotefs-rs:mainfrom
darktohka:main
Open

fix: webdav arguments are passed in wrong order#1
darktohka wants to merge 1 commit intoremotefs-rs:mainfrom
darktohka:main

Conversation

@darktohka
Copy link

WebDAV arguments are passed in the wrong order:

impl WebDAVFs {
    /// Create a new WebDAVFs instance
    pub fn new(username: &str, password: &str, url: &str) -> WebDAVFs {
        WebDAVFs {
            client: Client::init(username, password),
            url: url.to_string(),
            wrkdir: String::from("/"),
            connected: false,
        }
    }

The CLI calls it like this:

impl From<WebdavArgs> for WebDAVFs {
    fn from(args: WebdavArgs) -> Self {
        WebDAVFs::new(&args.url, &args.username, &args.password)
    }
}

This is clearly wrong, and results in the WebDAV CLI being unusable unless you switch up the name of arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant