-
Notifications
You must be signed in to change notification settings - Fork 99
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: (2) The target file is a directory, not a file on DirectoryInfo.Delete(true) #490
Comments
I could not reproduce using this test:
|
The exception should also mention the path to the file, could you verify it is indeed a file? |
Yes, it is definitely a Directory, and the directory is created by AlphaFS itself. My code is something like this:
I rolled back my application to the AlphaFS version I was using before, 2.0.1, and the code now works again just fine. I can't provide the actual code because it is proprietary code but any tests that you may want me to make and provide info I can gladly do for you. |
Ok, could you try the following, to see if it makes any difference:
|
Just to be sure, is the path mentioned in the exception the same path passed to the DirectoryInfo constructor? ("C:\Path\to\Directory") or one of the created sub directories? Also, does it happen every time, or occasionally? |
Yes, it is the same path mentioned. And the exception happens every time. |
I think it's solved. |
I could reproduce this issue with the following steps:
After moving the file '$New Text Document.txt' to the root of drive D, I was no longer be able to read its content. I have discovered the bug when working on raandree/NTFSSecurity#46. @Yomodo, are you planning to release a new version with fixes or is AlphaFS abandoned? |
I think it's already solved. |
Trying to delete a folder gives me the exception on the title. Using 2.2.6 version downloaded from nuget.
Stack trace:
The text was updated successfully, but these errors were encountered: