Title: [ERROR] File Occupation Exception · Issue #99 · GeneralLibrary/GeneralUpdate · GitHub
Open Graph Title: [ERROR] File Occupation Exception · Issue #99 · GeneralLibrary/GeneralUpdate
X Title: [ERROR] File Occupation Exception · Issue #99 · GeneralLibrary/GeneralUpdate
Description: Component Version 9.5.10 Operating System Version All CPU Instruction Set Architecture All Error Description In BinaryHandler.cs (within the Dirty method): If we replace the original code block: if (File.Exists(_oldfilePath)) { File.SetA...
Open Graph Description: Component Version 9.5.10 Operating System Version All CPU Instruction Set Architecture All Error Description In BinaryHandler.cs (within the Dirty method): If we replace the original code block: if...
X Description: Component Version 9.5.10 Operating System Version All CPU Instruction Set Architecture All Error Description In BinaryHandler.cs (within the Dirty method): If we replace the original code block: if...
Opengraph URL: https://github.com/GeneralLibrary/GeneralUpdate/issues/99
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ERROR] File Occupation Exception","articleBody":"### Component Version\n\n9.5.10\n\n### Operating System Version\n\nAll\n\n### CPU Instruction Set Architecture\n\nAll\n\n### Error Description\n\nIn BinaryHandler.cs (within the Dirty method): \nIf we replace the original code block:\n\n if (File.Exists(_oldfilePath))\n {\n File.SetAttributes(_oldfilePath, FileAttributes.Normal);\n File.Delete(_oldfilePath);\n }\n\n if (File.Exists(_newfilePath))\n {\n File.SetAttributes(_newfilePath, FileAttributes.Normal);\n File.Copy(_newfilePath, _oldfilePath, true);\n }\n\nwith:\n\nFile.SetAttributes(_oldfilePath, FileAttributes.Normal);\nFile.Delete(_oldfilePath);\nFile.Move(_newfilePath, _oldfilePath);\n\nThe code works normally sometimes, but occasionally throws a \"file is occupied\" exception — even though the file has actually been deleted. This issue is particularly prominent when the main program shuts down abnormally. \nAlthough File.Exists(_oldfile) returns false (meaning the file does not exist), the system still reports \"file is occupied\" due to multi-threading reasons. \nWhen the Move operation fails, I replaced it with File.Copy(xx, xx, true) for testing, and this solution works.\n\n### Hardware Driver Update\n\n_No response_\n\n### Error Sample Code Repository URL\n\n_No response_","author":{"url":"https://github.com/JusterZhu","@type":"Person","name":"JusterZhu"},"datePublished":"2026-01-12T03:37:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/99/GeneralUpdate/issues/99"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ce35c90d-103c-0b4c-6f7e-ffebe7aadb4b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 988C:272961:FCDCC8:14E530D:698051A2 |
| html-safe-nonce | 39ab397e25a4e3801c9494927a88d9880f62bb24a167bc89a0c1ba10eeb7d389 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODhDOjI3Mjk2MTpGQ0RDQzg6MTRFNTMwRDo2OTgwNTFBMiIsInZpc2l0b3JfaWQiOiI0OTk1Mzg0NzUzMzEwOTQ1Njk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 881ba5799adac2f49a8ee38e66c13f6414ecf2f116ef9e200bcfef99945d5d3e |
| hovercard-subject-tag | issue:3802644841 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/GeneralLibrary/GeneralUpdate/99/issue_layout |
| twitter:image | https://opengraph.githubassets.com/03d191601be652affa84d6584b4a546ca344902f6d95de48a7254e6ef3b74ac6/GeneralLibrary/GeneralUpdate/issues/99 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/03d191601be652affa84d6584b4a546ca344902f6d95de48a7254e6ef3b74ac6/GeneralLibrary/GeneralUpdate/issues/99 |
| og:image:alt | Component Version 9.5.10 Operating System Version All CPU Instruction Set Architecture All Error Description In BinaryHandler.cs (within the Dirty method): If we replace the original code block: if... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JusterZhu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/GeneralLibrary/GeneralUpdate git https://github.com/GeneralLibrary/GeneralUpdate.git |
| octolytics-dimension-user_id | 119129163 |
| octolytics-dimension-user_login | GeneralLibrary |
| octolytics-dimension-repository_id | 463893833 |
| octolytics-dimension-repository_nwo | GeneralLibrary/GeneralUpdate |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 463893833 |
| octolytics-dimension-repository_network_root_nwo | GeneralLibrary/GeneralUpdate |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width