Closed hrbrmstr closed 6 years ago
Good call - I want that file confirmed destroyed.
Seems to be tied to the longevity of the R/RStudio session (only tested on macOS tho). So it hangs around for a bit.
A PR into htmltools
is likely not the right approach (there's a reason it doesn't delete it right away).
I think replicating the functionality in-pkg and then putting up guiderails so it ensures confidentiality is likely the right way to go
I think this solves the issue, but do let me know if you don't think it's sufficient. This holds the session until the user says they're done, then completes the function, deleting the file on exit.
https://github.com/jonocarroll/opr/blob/d96df4d48e2d44c973cdec0fc329059f7bc2307e/R/utils.R#L58-L85
aye that shld do it!
https://github.com/jonocarroll/opr/blob/4c3a9c179e68db4319620e6b667cd183caa505f9/R/utils.R#L58-L79
one of us need to test the longevity of the temp HTML file created by
html_print()
. I don't see anyon.exit()
here https://github.com/rstudio/htmltools/blob/master/R/html_print.R#L41-L58 to remove the tempfile. either a PR for that or duplicating the functionality here and being in better control of it would likely be in order.