You'll notice
The Write tool now gives clear errors instead of failing vaguely when the target is a directory or a device/socket
What
The Write tool, which creates or overwrites files, used to only check whether the target path was a symlink before writing. It now also checks for two more cases:
- the target path is a directory, in which case it reports that it's a directory and suggests including a file name in
file_pathto create a file inside it - the target path is a non-regular file, such as a device, FIFO, or socket, which it now refuses to overwrite, noting that Write only creates or overwrites regular files
Each case gets its own distinct error rather than a generic failure.
Why
This gives clearer feedback when Write is pointed at something other than a plain file, instead of a confusing or misleading error.