knqyf263 / pet

Simple command-line snippet manager
MIT License
4.41k stars 222 forks source link

new: tempfile-handling #256

Closed crpb closed 6 months ago

crpb commented 7 months ago

replace /tmp/pet.tmp with a file created by os.CreateTmp which is no more world readable and will also be removed on exit.

https://pkg.go.dev/os#CreateTemp https://cs.opensource.google/go/go/+/refs/tags/go1.20:src/os/tempfile.go

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

RamiAwar commented 6 months ago

Thanks @crpb !