Skip to content

force-remove all files on Close #2120

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

tgulacsi
Copy link
Contributor

@tgulacsi tgulacsi commented Apr 27, 2025

PR Details

Force removing of all temporary files on File.Close().

Description

Don't quit on error while removing temp files during iteration over tempFiles Map.

Related Issue

#2119

Motivation and Context

Some of the temp files may be left there, occupying space.

How Has This Been Tested

go test

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tgulacsi, please resolve the merge conflicts.

@xuri xuri added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 27, 2025
@xuri xuri moved this to Bugfix in Excelize v2.9.1 Apr 27, 2025
@xuri xuri linked an issue Apr 27, 2025 that may be closed by this pull request
2 tasks
@tgulacsi tgulacsi mentioned this pull request Apr 27, 2025
2 tasks
@tgulacsi
Copy link
Contributor Author

Hmm, I've started from v2, should it've been master ?

@xuri
Copy link
Member

xuri commented Apr 27, 2025

Yeah, please made changes based on master branch.

@tgulacsi tgulacsi force-pushed the v2-fork-force-temp-remove branch from 0f39dd4 to a8c0fed Compare April 27, 2025 09:21
@tgulacsi
Copy link
Contributor Author

(Just a warning: the new TestZip64 needs at least 4GiB of temp space. I've had to increase my /tmp (its a tmpfs) - not a problem, just otherwise that test fails. Shall we Skip it if not enough space is there?)

@xuri
Copy link
Member

xuri commented Apr 27, 2025

I don't recommend skipping this test, only skipping it in GitHub Action pipeline.

Copy link

codecov bot commented Apr 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.23%. Comparing base (3ccbdaa) to head (a8c0fed).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2120   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files          32       32           
  Lines       30192    30196    +4     
=======================================
+ Hits        29961    29965    +4     
  Misses        153      153           
  Partials       78       78           
Flag Coverage Δ
unittests 99.23% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@xuri xuri merged commit efdfc52 into qax-os:master Apr 28, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
No open projects
Status: Bugfix
Development

Successfully merging this pull request may close these issues.

Temp files may be left
2 participants