sminez / ad

an adaptable text editor
https://crates.io/crates/ad-editor
MIT License
242 stars 9 forks source link

Sed -i fails when working on fsys files #18

Closed sminez closed 1 month ago

sminez commented 1 month ago

Describe the bug

sed reports an error when attempting to edit a file in place due to its use of temporary files not being supported by the fsys implementation

To Reproduce

Expected behavior

sed -i succeeds

Additional context

Double check with acme on whether or not this is supported there or not. Having to allow for arbitrary temporary files being created feels like its going to open a potential can of worms.

sminez commented 1 month ago

Double checked with trying this via fuse mounting the acme 9p interface via 9pfuse /tmp/ns.$USER.:0/acme $HOME/acme and it errors in the same way so supporting this is parked for the moment:

$ sed -i 's/foo/bar/' acme/1/tag
sed: couldn't open temporary file acme/1/sed0GyLXv: Permission denied