enso
enso copied to clipboard
Writing a file to the cloud doesn't work
This is having pressed the Write All button
This is because the parent directory does not exist.
The behaviour is consistent across our filesystems, I think it is rare that write to file creates all parent directories by default - although I do imagine it is quite useful.
I think perhaps the error here is unhelpful - that's why it's confusing.
We can:
- make the error better, telling exactly that the 'parent directory does not exist, please
create_directoryfirst', - or we can change the semantics of
with_output_stream(as that is used for most writing) to default to creating the parent directories.
@AdRiley which one do you prefer? I imagine (2) will be more practical for users.*
- Although it may sometimes lead to unexpected behaviour - like a typo in directory name is not detected but instead a sibling directory is created.