-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Re-attempt to delete temporary upload if the file is locked by another process #12447
Conversation
Fix go-gitea#12339 Signed-off-by: Andrew Thornton <art27@cantab.net>
File deletion on Windows can be a pain with the locking. I wonder if there are any third-party golang modules similar to https://github.com/isaacs/rimraf/blob/master/rimraf.js that deal with the various error scenarios. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Fine. Let's do this properly - replace all uses of os.Remove / os.RemoveAll with util.Remove / util.RemoveAll which will reattempt on certain errors. |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: silverwind <me@silverwind.io>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Codecov Report
@@ Coverage Diff @@
## master #12447 +/- ##
==========================================
- Coverage 43.80% 43.79% -0.01%
==========================================
Files 630 631 +1
Lines 69821 69851 +30
==========================================
+ Hits 30585 30594 +9
- Misses 34300 34311 +11
- Partials 4936 4946 +10
Continue to review full report at Codecov.
|
Fix #12339
Signed-off-by: Andrew Thornton art27@cantab.net