c# - Programmatically delete directory of cloned repository -
i using libgit2sharp
clone remote repository windows temp folder. after script has completed, want clean up. however, following error:
systemerror: access path 'pack-efcef325f8dc897099271fd0f3db6cf4d9f12393.idx' denied.
where pack-efcef325f8dc897099271fd0f3db6cf4d9f12393.idx
file in $local_git_clone_path\objects\pack.
how can delete local leftovers of git repo cloned using libgit2sharp ?
i remember having faced similar situation.
and, advised @nulltoken, have dispose()
repository
before trying delete files being held it.
using
should best option.
using (var repo = new repository(repositorypath)) { //your repo specific implementation. } //code delete local temp dir
reference: clone fixture libgit2sharp
Comments
Post a Comment