-
Notifications
You must be signed in to change notification settings - Fork 43
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 from fileInfo.Exists when file does not exist #34
Comments
Here is the 'Exists' code that fails: Another (besides createdTime and modifiedTime) that throws exceptions with Pri.LongPath is LastWriteTime. |
I ran a test with a fake filename, and 'exists' works as expected. I need to look into this more. |
The person has an 'H' drive that is mapped but is not connected. The file is nested inside this drive, and the path has been saved to DB. When Database is read, we check to see if the file exists. The drive is mapped, but not connected, so it should return 'False'. Instead it throws the above error. |
I forgot to mention that this is with the Nuget 1.3.2 |
Can't reproduce with the latest build. Assume it's fixed by other changes. Returns false now, not an exception. |
I have the following exception sent in from a tester:
The filepath is ~160 characters and filename is another 60 characters, but the file does not exist. In fact, there's a good chance that the drive doesn't exist since this is my friend on a corporate computer with network drive.
Another thing I noticed is that fileInfo's createdTime and modifiedTime is much more sensitive (throws exceptions) when file does not exist verses the System.IO.FileInfo version. Not as important, I put a check first (if (fileInfo.Exists)), but now that throws exceptions too ;^)
The text was updated successfully, but these errors were encountered: