Some exception error when delete folders
1.some file been opened in other program 2.file property is readonly etc.
by the way, I fixed those issues, how can i commit it?
my Soluation,is add this method in fileutility ,then replace the directory.delete: public static void DeleteDirectory(string varDirePath,bool varRecursive) { string[] tempDirs = Directory.GetDirectories(varDirePath); string[] tempFiles = Directory.GetFiles(varDirePath); foreach (var tempDir in tempDirs) { File.SetAttributes(tempDir, FileAttributes.Normal); } foreach (var tempFile in tempFiles) { File.SetAttributes(tempFile, FileAttributes.Normal); File.Delete(tempFile); } File.SetAttributes(varDirePath, FileAttributes.Normal); Directory.Delete(varDirePath, varRecursive); }
Comments (3)
-
-
reporter Coool..i'm newbie for bitbucket ,3Q for your patience
-
- changed status to resolved
Fixed with a2f1600. Thanks for the PR!
- Log in to comment
To submit your fix, please fork AssetBundleGraphTool project, work in there, and then create pull request. Please create pull request to dev branch rather than release when you do so.