Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
erikvona opened this issue Sep 6, 2023 · 0 comments

Comments

@erikvona
Copy link

erikvona commented Sep 6, 2023

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.

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

No branches or pull requests

1 participant