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

Rare possibility for 0 byte files to be left around #233

Open
Xavron opened this issue May 7, 2024 · 0 comments
Open

Rare possibility for 0 byte files to be left around #233

Xavron opened this issue May 7, 2024 · 0 comments

Comments

@Xavron
Copy link

Xavron commented May 7, 2024

Both java.io.File & scoped storage are affected here.

When storing a file, the file is created:

https://github.com/ppareit/swiftp/blob/df0db0eeece48267c27e98da6117fd9d61e05b4f/app/src/main/java/be/ppareit/swiftp/server/CmdAbstractStore.java#L88C1-L103C18

Any issue at all following it such as during openDataSocket() for example:

https://github.com/ppareit/swiftp/blob/df0db0eeece48267c27e98da6117fd9d61e05b4f/app/src/main/java/be/ppareit/swiftp/server/CmdAbstractStore.java#L146C1-L146C51

Will leave 0 byte files around as there is no cleanup. A client may fail to fix it. Any automated client will now have corrupted files and need to do full hash or size check of all files to fix it.

Could fall on client side depending on viewpoint. If errors out, verify all files. So, can be closed if that is the end viewpoint. Didn't look at ftp specs on it.

@Xavron Xavron changed the title Rare possibility for corrupted files to be left around Rare possibility for 0 byte files to be left around May 7, 2024
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

No branches or pull requests

1 participant