drop_delete with dtoken
- Dominant language
- R
- Stars
- 253
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
I am using rdrop2 for doing some file and user management for a shinyapp (at least for the moment). When using drop_delete() while setting the dtoken argument to my token (from an encrypted RDS file), the browser popup with the authorization for rdrop2 on dropbox, which is not the behavior expected given that I passed dtoken to the function. This does not do that when passing dtoken to some other drop_*() functions such as drop_upload().
From my diagnosis on why it does that, it seems that the drop_delete() function uses the drop_exists() function internally but does not pass dtoken to the drop_exists() function when calling it. This leads to get_dropbox_token() being called in all cases in the drop_delete() function ( because of the default parameters of drop_exists() ). This happens in other functions such as drop_create(), drop_copy(), drop_move().
For now, I did my own drop_delete2() function changing drop_exists(path) to drop_exists(path, dtoken = dtoken), but it would be nice if this could be done in a future version of the package, at least if my diagnostic is right.
Contributor guide
Research direction
Start by locating drop_delete() and its call to drop_exists(path), then inspect the related drop_create(), drop_copy(), and drop_move() implementations mentioned in the issue. Verify how dtoken is propagated and run the package's relevant tests, if present; done means operations using an explicit token no longer trigger Dropbox authorization unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100