Thanks to visit codestin.com
Credit goes to github.com

Skip to content

scp_upload and scp_download fail for UNC paths without permission on root directory #66

@erikvona

Description

@erikvona

scp_upload and scp_download both make use of normalizePath with mustWork = TRUE (here and here)

normalizePath throws errors for valid paths if it cannot read every single underlying directory. This is documented in the Value section for normalizePath. For SMB shares, access to underlying directories is often denied.

This causes scp_upload and scp_download to fail if the local source or destination is a directory with no access to the underlying directory, with Error in normalizePath(path.expand(path), winslash, mustWork) : Access is denied, even if the directory is valid and the user has read and write permissions on that directory.

Please consider removing the mustWork = TRUE, ideally replacing it with mustWork = FALSE to reduce unneeded warnings, and add a different way of verifying the location is a valid directory (e.g. use file.info).

Alternatively, consider adding an argument to allow users to use these functions without stopping on a normalizePath failure.

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