diff --git a/cli/modules/Dump.cpp b/cli/modules/Dump.cpp index c49e8a101..e0b17ab92 100644 --- a/cli/modules/Dump.cpp +++ b/cli/modules/Dump.cpp @@ -541,7 +541,7 @@ std::string Dump::call(const po::variables_map &vm, const po::options_descriptio throw FileNotFound(file_path); } // try to open! - tmp_file = nix::File::open(file_path, nix::FileMode::ReadWrite); + tmp_file = nix::File::open(file_path, nix::FileMode::ReadOnly); // file opened? if (!tmp_file.isOpen()) { throw FileNotOpen(file_path); diff --git a/cli/modules/Validate.cpp b/cli/modules/Validate.cpp index 402680d1b..2de831e6f 100644 --- a/cli/modules/Validate.cpp +++ b/cli/modules/Validate.cpp @@ -49,7 +49,7 @@ std::string Validate::call(const po::variables_map &vm, const po::options_descri throw FileNotFound(file_path); } // try to open! - tmp_file = nix::File::open(file_path, nix::FileMode::ReadWrite); + tmp_file = nix::File::open(file_path, nix::FileMode::ReadOnly); // file opened? if (!tmp_file.isOpen()) { throw FileNotOpen(file_path);