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

Remove Temporary Files if the program terminates abnormal #800

Conversation

Prince-Bhagat
Copy link
Contributor

While sending text from one device to another, we create a temporary file in the app's root directory. But if the program gets terminated for some reason or the user terminates it intentionally, the temporary files are stored in the root folder forever.

Steps to reproduce the bug

  1. croc send --text randomtext
  2. ctrl + c (this is to terminate program abnormally)

check the temporary files in the directory
Solution

  • Create a separate directory called temp for storing the temporay files.
  • Implement the callback for program termination to clean up the temporary data.

@Prince-Bhagat Prince-Bhagat changed the title Adding temp directory for managing temporary files Remove Temporary Files if the program terminates abnormal Sep 3, 2024
@schollz schollz merged commit cdf3aa0 into schollz:main Sep 3, 2024
2 checks passed
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.

2 participants