fs icon indicating copy to clipboard operation
fs copied to clipboard

error from path_rel()

Open vorpalvorpal opened this issue 1 year ago • 0 comments

Hi,

I was using fs::path_rel inside my own function. I gave my function multiple paths as an argument which was then handed on to path_rel as multiple paths for its start argument. Obviously this created an error:

Error in if (is.na(start)) { : the condition has length > 1

This was quite an uninformative error, and it took quite a bit of digging around to figure out the error was from path_rel. Would it be possible to add a check for length(start) == 1 (or something similar) and then display a more useful error?

vorpalvorpal avatar Feb 27 '23 04:02 vorpalvorpal