mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 07:31:00 +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:
parent
fb79e6a7a1
commit
cf0e563f38
1 changed files with 4 additions and 0 deletions
|
|
@ -287,6 +287,10 @@ class AutoDelete
|
||||||
public:
|
public:
|
||||||
AutoDelete();
|
AutoDelete();
|
||||||
AutoDelete(const std::filesystem::path & p, bool recursive = true);
|
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();
|
~AutoDelete();
|
||||||
|
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue