peteraritchie / LongPath

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

Fix issue #43 - race condition in directory creation #57

Closed herebebeasties closed 7 years ago

herebebeasties commented 7 years ago

The "Not sure this is even possible" is wrong. Someone else can obviously come along in another thread and create the directory underneath you. If you're doing multi-threaded copy operations then this is actually quite likely; one of our apps is running into this all the time.

peteraritchie commented 7 years ago

You are of course correct. Apologies for not getting to this sooner. Thanks for the pull request. Looks exactly how I would have fixed it!