Skip to content

Commit

Permalink
Merge pull request #658 from jgrewe/cli
Browse files Browse the repository at this point in the history
[nix-tool] change file mode to ReadOnly in order to read old version …
  • Loading branch information
achilleas-k authored Jan 3, 2017
2 parents 815cbd4 + bb4c513 commit e136dcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/modules/Dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion cli/modules/Validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e136dcd

Please sign in to comment.