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.

(cherry picked from commit 40e3f5c0a4)
This commit is contained in:
Sergei Zimmerman 2025-12-01 03:09:20 +03:00 committed by github-actions[bot]
parent fb79e6a7a1
commit cf0e563f38

View file

@ -287,6 +287,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();