Closed mlsad3 closed 8 years ago
Here is the 'Exists' code that fails: var fileInfo = new FileInfo(sourceFile); if (fileInfo.Exists) { ... }
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.e. H:\Patent\Client\3582347 - (WH 7583) TestSubject\384572US03_2098\DRAFT\MyDraft v1.docx Where H:\ is mapped but not connected.
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 ;^)