Skip to content

Update toolbar.py #58

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sparrowjack234
Copy link

Cleaning up unused temporary files to avoid disk storage leak. #57 Resolved

Cleaning up unused temporary files to avoid disk storage leak.
@quozl
Copy link
Collaborator

quozl commented Apr 28, 2025

I don't think you understand the Abi Widget insert_image API. Please reference the API documentation or source to confirm the file may be deleted.

@sparrowjack234
Copy link
Author

You're right - I misunderstood how the AbiWord widget's insert_image API works. Looking more carefully at the code, deleting the file immediately after insertion would probably cause the image to disappear from the document. Will look for another approach for issue #57. Thank you.

@quozl
Copy link
Collaborator

quozl commented Apr 28, 2025

This would be entirely reproducible if so; did you test?

The storage location is the activity instance root. Isn't that cleaned up automatically if the journal entry is deleted?

@sparrowjack234
Copy link
Author

You're right - the activity instance root gets cleaned up automatically when the journal entry is deleted. I should have looked more carefully at how Sugar manages temporary storage before suggesting a fix. Thanks for explaining this - I'll make sure to test more thoroughly in the future.

@quozl
Copy link
Collaborator

quozl commented Apr 29, 2025

Please test next time. I've just made a test; alt-1 to get a screenshot, open write activity, insert image, stop activity, examine filesystem, delete all journal entries, examine filesystem find . -type f -cmin -3|less

A file ./data/1db4cbd2-a99e-4ce9-8bc8-875c7703fd52_ezcxbl_o.png was present and had not been deleted.

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