Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

util/win32: Continue if access is denied when deleting a folder.#6929

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

lrm29
Copy link
Contributor

@lrm29lrm29 commentedOct 25, 2024
edited
Loading

I'm afraid people do put Git repos on OneDrive... It seems to like to prevent folders from being deleted, causing libgit2 operations to handle ERROR_ACCESS_DENIED, and preventing us from switching branches/merging etc.

I think this change brings libgit2 in line with the behaviour of Git for Windows. The rmdir function is locatedhere. The function is_file_in_use_error not only checks for ERROR_SHARING_VIOLATION, but also ERROR_ACCESS_DENIED:

staticinlineintis_file_in_use_error(DWORD errcode){switch (errcode) {case ERROR_SHARING_VIOLATION:case ERROR_ACCESS_DENIED:return1;}return0;}

Completely understand any hesitation about merging this, but thought it might be useful to at least raise it so others can search for it. I've tried it out and it seems to work ok.

Of course, it means empty folders can end up lying around in your local Git repository which is also confusing. But Git for Windows is the same.

@ethomson
Copy link
Member

Seems reasonable!

@ethomsonethomson merged commitc6111ec intolibgit2:mainOct 29, 2024
19 checks passed
@ethomsonethomson added the bug labelDec 16, 2024
@lrm29lrm29 deleted the util_win32_rmdir_access_denied branchJanuary 7, 2025 12:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@lrm29@ethomson

[8]ページ先頭

©2009-2025 Movatter.jp