blob: 3b347ef413c3283986a3b2a4a9b544e08f7c6304 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- a/reduze/files.cpp
+++ b/reduze/files.cpp
@@ -723,7 +723,7 @@
string file_name_tmp = file_name + ".tmp";
ofstream file(file_name_tmp.c_str());
if (!file)
- ABORT("Can't write to " << file);
+ ABORT("Can't write to " << file_name_tmp);
Emitter os;
os << BeginMap;
os << Key << "crossings" << Value;
@@ -752,7 +752,7 @@
string file_name_tmp = file_name + ".tmp";
ofstream file(file_name_tmp.c_str());
if (!file)
- ABORT("Can't write to " << file);
+ ABORT("Can't write to " << file_name_tmp);
os << YAML::BeginMap << YAML::Key << "sectormappings" << YAML::Value;
os << m << YAML::EndMap;
file << os.c_str();
@@ -1036,7 +1036,7 @@
bool is_readable_file(const string& filename) {
ifstream is(filename.c_str());
- bool ok = is;
+ bool ok = !is.fail();
is.close();
return ok && !is_readable_directory(filename);
}
|