Azure / Microsoft365R

R SDK for interacting with Microsoft 365 APIs
Other
308 stars 42 forks source link

delete_item won't accept confirm = TRUE argument #117

Closed mpr1255 closed 2 years ago

mpr1255 commented 2 years ago

Hello,

Run this code to duplicate the bug:

system("echo 'hello world' > ./testfile.txt")
od$upload_file("./testfile.txt", "testfile.txt")
od$delete_item("testfile.txt", confirm = TRUE)

In my case it kept returning Do you really want to delete the drive item 'testfile.txt'? (yes/No/cancel) (uh, yes, hehe).

I'm trying to use this as part of a data processing pipeline and the need to manually confirm kinda wrecks that. Great library; thank you.

mpr1255 commented 2 years ago

With apologies, of course I meant confirm = F and that indeed works as intended. (However, I cannot delete items that are already open ['locked']... which is too bad. I'll come up with workarounds.)

hongooi73 commented 2 years ago

Note that when you use Microsoft365R in an unattended pipeline, it should never ask for confirmation anyway. Ideally you would be doing that by logging in using one of the methods described in the vignette.