Did you actually call the full kernel function here, including:
Yeah, these pass for me too. And I can’t find any documentation that any of this would be UB or lead to errors. Hence my confusion about how you got your error message.
0 fs::path path{fs::absolute(fs::PathFromString({nullptr, 0}))};
1 fs::create_directories(path);
2 path = fs::absolute(fs::PathFromString(""));
3 fs::create_directories(path);
I wonder what the valid meaning is here, of passing an empty string?
I’m not sure there’s going to be a conclusive answer, here. I’m really not sure myself. I think intuitively, passing a nullptr or empty string should be equivalent. The least surprising behaviour is probably for that to mean “no directory passed, so use the default directory”, which then probably would be mean the cwd, which is the current behaviour of this PR. I have force-pushed a doc update to make this explicit.
I would not be opposed to failing and returning nullptr when a null or empty string is passed. It’s just more opinionated, and it doesn’t seem necessary for kernel to work well, hence the current approach. If reviewers prefer this, please leave your thoughts and I’m happy to push an update.