mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 04:19:59 +02:00
Add a todo for a failsafe for the socket cleanup
This commit is contained in:
@@ -217,6 +217,11 @@ class Sockets {
|
||||
*/
|
||||
virtual ~Sockets() {
|
||||
try {
|
||||
// TODO: Check whether `base_dir` is actually in `/tmp` or
|
||||
// `$XDG_RUNTIME_DIR`, don't do anything if it's not. Someone
|
||||
// has deleted their entire home directory while messing with
|
||||
// `yabridge-host.exe`'s arguments, and that sounds like
|
||||
// something that would be easy to prevent.
|
||||
boost::filesystem::remove_all(base_dir);
|
||||
} catch (const boost::filesystem::filesystem_error&) {
|
||||
// There should not be any filesystem errors since only one side
|
||||
|
||||
Reference in New Issue
Block a user