Skip to content

Commit e136dcd

Browse files
authored
Merge pull request #658 from jgrewe/cli
[nix-tool] change file mode to ReadOnly in order to read old version …
2 parents 815cbd4 + bb4c513 commit e136dcd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cli/modules/Dump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ std::string Dump::call(const po::variables_map &vm, const po::options_descriptio
541541
throw FileNotFound(file_path);
542542
}
543543
// try to open!
544-
tmp_file = nix::File::open(file_path, nix::FileMode::ReadWrite);
544+
tmp_file = nix::File::open(file_path, nix::FileMode::ReadOnly);
545545
// file opened?
546546
if (!tmp_file.isOpen()) {
547547
throw FileNotOpen(file_path);

cli/modules/Validate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ std::string Validate::call(const po::variables_map &vm, const po::options_descri
4949
throw FileNotFound(file_path);
5050
}
5151
// try to open!
52-
tmp_file = nix::File::open(file_path, nix::FileMode::ReadWrite);
52+
tmp_file = nix::File::open(file_path, nix::FileMode::ReadOnly);
5353
// file opened?
5454
if (!tmp_file.isOpen()) {
5555
throw FileNotOpen(file_path);

0 commit comments

Comments
 (0)