Last post Mar 29, 2018 05:40 PM by PatriceSc
Mar 29, 2018 02:55 AM|PhC|LINK
I would like to save the mail message using specifiedPickupDirectory. I find that system will auto generate the filename.
May I know will filename be duplicated if there are two users send email at the same time?
Mar 29, 2018 05:40 PM|PatriceSc|LINK
No. It is based on Guid values. For a mathematician you could have collisions but in practice the probability is so low that you could ignore that.
https://en.wikipedia.org/wiki/Universally_unique_identifier#Collisions to see how unlikely it is. Being curious I checked the code at https://referencesource.microsoft.com/ and they even loop until the
generated file name doesn't match an existing name.
If you saw some actual problem, it could be a thread safety issue. If not, being suspicious is good but make sure to not be more suspicious than needed ;-)