Commit d2788f3
committed
sdk/rust: Fix hostfs create_file() failing with EEXIST on existing files
Replace O_EXCL with O_TRUNC in create_file for both Linux and Darwin
hostfs backends. The FUSE create op is called by the kernel for
open(O_CREAT) on existing files (e.g. cargo overwriting .d dependency
files), so create_file needs to truncate rather than fail. Higher-level
callers already guard against unwanted overwrites with their own
existence checks.1 parent fef7b6a commit d2788f3
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
676 | | - | |
| 676 | + | |
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
0 commit comments