afero icon indicating copy to clipboard operation
afero copied to clipboard

add option to have strict file creation behavior

Open natebrennand opened this issue 2 years ago • 4 comments

Workaround for https://github.com/spf13/afero/issues/373

Adds an option to have MemMapFS fail when creating a file in a directory that DNE.

natebrennand avatar Jul 25 '22 18:07 natebrennand

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 25 '22 18:07 CLAassistant

I'd consider it a bug that it ever allowed this in the first place. A file create on OsFs would fail, it would be less surprising if MemFs also had that behavior. We've had bugs slip by testing due to this difference, but I'm not sure we would have noticed that we need to turn strict mode on for MemFs if it was an option like this.

Frassle avatar Apr 01 '23 21:04 Frassle

I agree that it's a bug, but fixing it would be a breaking change. Dunno that a v2 is anywhere on the horizon

natebrennand avatar Apr 01 '23 21:04 natebrennand

fixing it would be a breaking change.

Obligatory xkcd: https://xkcd.com/1172/

Frassle avatar Apr 01 '23 21:04 Frassle