peteraritchie / LongPath

drop-in library to support long paths in .NET
GNU Lesser General Public License v3.0
112 stars 43 forks source link

Parameter is not correct - Pri.LongPath.Directory.BeginFind #58

Open mlsad3 opened 7 years ago

mlsad3 commented 7 years ago

I'm unfortunately using a version of Pri.LongPath that is a year or two old, so I'm not sure if this is still an issue. It is tough to reproduce though. I have a customer that hits this issue about once a week.

You can see below the stacktrace, and a mention of "System.IO.IOException - The parameter is incorrect" inside of Pri.LongPath.Directory.BeginFind().

At this point I do not have any additional information that could help in debugging this. Do you know where, within BeginFind(), I could maybe add some additional information to log files on this?

image

mlsad3 commented 7 years ago

My library stated 2.0.0-beta, I'm updating to the latest and will see if they can reproduce it.

mlsad3 commented 7 years ago

Updating to latest Pri.LongPath, the user still hits this issue. Same stack trace.

mlsad3 commented 7 years ago

The user manually tried going to the folder that had issues. Note, this folder name (1234_5678-110) was already returned from parentFolder.GetDirectories(), and the code is now iterating on each of these child folders with child.GetDirectories().

The user, when he navigates Windows Explorer to the parentFolder, can see the list of directories underneath. (Note this is a network drive). Then when user double-clicks on 1234_5678-110, an error message appears in windows: "1234_5678-110 is not accessible. Access is denied."

image

mlsad3 commented 7 years ago

One more side note, somewhat related. The same person has a shared network folder with paths like: \\SLFILE01\Files1\mydoc.docx

When he goes home, and isn't connected to network, the following throws an exception: FileInfo fi = new FileInfo (@"\\SLFILE01\Files1\mydoc.docx"); var bad = fi.Exists; // This throws exception It is expected that fi.Exists would throw 'false' instead. I'm putting a try/catch around the Exists function now.

peteraritchie commented 7 years ago

I haven't been able to repo this; but is the user using Sync Center or some other method of offline files?

mlsad3 commented 7 years ago

Hi, Just checked with the user. They aren't using anything like that at work. You can close this if you want. I've already modified (added try/catch around the Exists function) my own branch and am not blocked by this issue. Thanks