When you delete a file and then create a new file with the same name, the contents of the now-deleted file appear in the new file.
When you delete a file and create a new one with the same name, the new one should be empty.
When you delete a file and create a new one with the same name, the new one is not empty. Instead, it has the content from the original file in it.
Steps to reproduce:
- Create a new file
- Type something into the file
- Delete the file
- Create a new file with the same name as the original file
- Open it
I can reproduce this on Windows 11, FF developer edition 108.0b9.
I would argue that this is expected behaviour as file history should be able to retrieve accidentally deleted files. One alternative solution would be to delete the contents of the file, rather than delete the file and create a new one with exactly the same name.
Are the deleted files preserved when the Replit is forked? If so, it could allow others to access information the creator thought was deleted.
Hi @WWBJSFWGWYBAUPA the answer to your question is no. I’ve just tried forking a number of randomly selected Repls from community and I just see the most up to date version.