mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Merge pull request #3656 from obsidiansystems/handle-unknown-file-ingestion
Add error message when FileIngestionMethod is out of bounds
This commit is contained in:
commit
d558fb98f6
1 changed files with 3 additions and 1 deletions
|
@ -358,8 +358,10 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
|
|||
std::string s, baseName;
|
||||
FileIngestionMethod method;
|
||||
{
|
||||
bool fixed, recursive;
|
||||
bool fixed; uint8_t recursive;
|
||||
from >> baseName >> fixed /* obsolete */ >> recursive >> s;
|
||||
if (recursive > (uint8_t) FileIngestionMethod::Recursive)
|
||||
throw Error("unsupported FileIngestionMethod with value of %i; you may need to upgrade nix-daemon", recursive);
|
||||
method = FileIngestionMethod { recursive };
|
||||
/* Compatibility hack. */
|
||||
if (!fixed) {
|
||||
|
|
Loading…
Reference in a new issue