1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-02 23:20:59 +01:00

libutil: Make AutoDelete non-copyable and non-movable

This is a good precaution, since we don't want to delete
directories twice accidentally.
This commit is contained in:
Sergei Zimmerman 2025-12-01 03:09:20 +03:00
parent bf7c53f2d3
commit 40e3f5c0a4
No known key found for this signature in database

View file

@ -294,6 +294,10 @@ class AutoDelete
public:
AutoDelete();
AutoDelete(const std::filesystem::path & p, bool recursive = true);
AutoDelete(AutoDelete &&) = delete;
AutoDelete(const AutoDelete &) = delete;
AutoDelete & operator=(AutoDelete &&) = delete;
AutoDelete & operator=(const AutoDelete &) = delete;
~AutoDelete();
void cancel();