gleam icon indicating copy to clipboard operation
gleam copied to clipboard

Possible risk of temporary file collision

Open JensRantil opened this issue 5 years ago • 1 comments

I'm reading https://github.com/chrislusf/gleam/blob/766b2213edfa10ea296bba3b3adb0862606b5518/filesystem/vfs_s3.go#L83 and https://github.com/chrislusf/gleam/blob/53a69565476a403024c43247a7eb0eb728feaa43/filesystem/vfs_gs.go#L108 and both has a slight risk of file name collisions. I propose migrating to use https://golang.org/pkg/io/ioutil/#TempFile which makes that scenario impossible.

JensRantil avatar Oct 25 '20 13:10 JensRantil

Send a PR?

chrislusf avatar Oct 25 '20 14:10 chrislusf