Browse Source

Correct logging level in mpqapi.cpp

pull/2646/head
Anders Jenbo 5 years ago
parent
commit
e0a7e593d0
  1. 8
      Source/mpqapi.cpp

8
Source/mpqapi.cpp

@ -177,7 +177,7 @@ struct Archive {
bool Open(const char *path) bool Open(const char *path)
{ {
Close(); Close();
LogVerbose("Opening {}", path); LogDebug("Opening {}", path);
exists = FileExists(path); exists = FileExists(path);
std::ios::openmode mode = std::ios::in | std::ios::out | std::ios::binary; std::ios::openmode mode = std::ios::in | std::ios::out | std::ios::binary;
if (exists) { if (exists) {
@ -185,7 +185,7 @@ struct Archive {
Log(R"(GetFileSize("{}") failed with "{}")", path, std::strerror(errno)); Log(R"(GetFileSize("{}") failed with "{}")", path, std::strerror(errno));
return false; return false;
} }
LogVerbose("GetFileSize(\"{}\") = {}", path, size); LogDebug("GetFileSize(\"{}\") = {}", path, size);
} else { } else {
mode |= std::ios::trunc; mode |= std::ios::trunc;
} }
@ -203,14 +203,14 @@ struct Archive {
{ {
if (!stream.IsOpen()) if (!stream.IsOpen())
return true; return true;
LogVerbose("Closing {}", name); LogDebug("Closing {}", name);
bool result = true; bool result = true;
if (modified && !(stream.Seekp(0, std::ios::beg) && WriteHeaderAndTables())) if (modified && !(stream.Seekp(0, std::ios::beg) && WriteHeaderAndTables()))
result = false; result = false;
stream.Close(); stream.Close();
if (modified && result && size != 0) { if (modified && result && size != 0) {
LogVerbose("ResizeFile(\"{}\", {})", name, size); LogDebug("ResizeFile(\"{}\", {})", name, size);
result = ResizeFile(name.c_str(), size); result = ResizeFile(name.c_str(), size);
} }
name.clear(); name.clear();

Loading…
Cancel
Save