diamond-android icon indicating copy to clipboard operation
diamond-android copied to clipboard

Implement `createTempDirectory`

Open bamos opened this issue 9 years ago • 0 comments

From https://github.com/cmusatyalab/diamond-android/commit/5b6b978080068dca1290aa5f92233197f7f42996#commitcomment-7951862:

That's mostly harmless in this case, since the cache dir is per-application, but racy in general. Sadly, Android doesn't yet seem to have added createTempDirectory from JDK 7. If it were me, I'd probably implement createTempDirectory myself by looping over random suffixes and trying mkdir, rather than leaving a race lurking in the code, but I could see it either way.

bamos avatar Sep 28 '14 06:09 bamos