V
V
VanilaSpirit2020-08-17 11:35:51
C++ / C#
VanilaSpirit, 2020-08-17 11:35:51

C#. How to delete .git folder?

I clone the repository through the code and when I no longer need it, I delete it, but everything except the .git folder is deleted - on it it drops the error "Access to the path 'pack-3241a6c3ea7ff447e5ba864f5d87ef66c5913670.idx' is denied."

I tried file.Attributes = FileAttributes.Normal (they say it helped)

If it can be in non-closed streams, then I assure you that I commented out everything except Directory.Delete(path, true);

How can the problem be solved?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question