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

Fix for uploading to directories with conflicting files #129

Merged
merged 4 commits into from
Aug 19, 2020

Conversation

aaronwolen
Copy link
Member

This is a fix for #121.

We were failing to match local files with their remote counterparts when the destination was a directory because remote paths for files included the directory name (e.g., dir/file.txt) but we were passing paths relative to the target directory (i.e., ./file.txt).

I've tested a few different scenarios and the patch seems to hold but would appreciate some additional testing. @mnoetel, @timriffe, @cimentadaj, @befriendabacterium, let me know if get a chance to give it a spin.

@aaronwolen aaronwolen changed the title Fix for uploading to directories with conflicting files (WIP) Fix for uploading to directories with conflicting files Aug 17, 2020
@befriendabacterium
Copy link

Hey Aaron, thanks for looking into this. I just reinstalled from github and tried, but same error. Console output below:

osf_upload(pp_project[which(pp_project$name=='temporal'),],
'temporary/google_england.csv', conflicts='overwrite')
Error: Cannot complete action: file or folder "google_england.csv" already exists in this location
HTTP status code 409.

@aaronwolen
Copy link
Member Author

Thanks, @befriendabacterium. Can you verify you're using this branch: packageVersion("osfr") should be ‘0.2.8.9001’.

If not you can install directly with:

remotes::install_github("ropensci/osfr", ref = remotes::github_pull(129))

@befriendabacterium
Copy link

Ah I see, sorry my bad! Works a treat - nice one!

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.

2 participants