With the default of `multi=TRUE`, `choose.files()` returns `character(0)` when the user presses Cancel. However, with `choose.files(multi=FALSE)` and the user presses Cancel, it returns a zero-length string, `""`. As an example, both times I press "Cancel": ```r choose.files() # press Cancel ## character(0) choose.files(multi = FALSE) # press Cancel ## [1] "" ``` Based on the verbiage in the Rd: *"If the user cancels the dialog, then zero files are returned"*, I would expect the following behavior: ```r choose.files() # press Cancel ## character(0) choose.files(multi = FALSE) # press Cancel ## character(0) ``` This could be interpreted as a bug in the code or an inconsistency in the documentation; I see it more as the former. I truly appreciate the efforts of the R dev team. Thank you for your continued efforts! -bill
I agree it's a bug; will fix in R-devel and R-patched. Thanks for the report.