Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix InMemory not overwriting on move #1684

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from

Conversation

kynx
Copy link

@kynx kynx commented Jul 17, 2023

This fixes the InMemoryFilesystemAdapter not copying or moving directories

@frankdejonge
Copy link
Member

Can you make this strategy configurable via a constructor option? Otherwise this would be a major BC break and I do not want to cause that.

@kynx
Copy link
Author

kynx commented Jul 17, 2023

@frankdejonge Uh, OK. Guess the documentation should be updated to reflect the fact that not all adapters behave the same?

@kynx
Copy link
Author

kynx commented Jul 17, 2023

@frankdejonge Actually I might have got a little carried away with copying and moving directories. My initial problem was with the SFTP adapter not overwriting files when moving after upgrading an old project from 1.x to 3.x. Looking back at the docs there is no mention of copying or moving directories.

I do think it's a bug that some adapters don't overwrite files on move - the docs clearly say they do. If I moved the directory stuff to a different PR targeting the next major, would that work?

@kynx kynx changed the title Fix InMemory adapter not copying or moving directories Fix InMemory not overwriting on move Jul 18, 2023
@kynx
Copy link
Author

kynx commented Jul 18, 2023

@frankdejonge I've removed the directory copy / move stuff. This now just brings this adapter in line with the others, overwriting existing files on move.

Please let me know if you still think this needs a constructor arg for specifying this behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants