Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2016-06-02 15:55:13 +0300
committerYuri Gorshenin <y@maps.me>2016-06-03 00:29:29 +0300
commit573021d80952bb9b82af4bac6b03622c7231b936 (patch)
tree01b19e942d4140fc537fc70771574cba62d2905d /coding/file_container.cpp
parent3dff889eb4e1aa49bfd8f7226b7ec80499a33a8e (diff)
[index] Fixed massive descriptors leaks.
Diffstat (limited to 'coding/file_container.cpp')
-rw-r--r--coding/file_container.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/coding/file_container.cpp b/coding/file_container.cpp
index 35f5733323..ebe1fbaa51 100644
--- a/coding/file_container.cpp
+++ b/coding/file_container.cpp
@@ -3,6 +3,8 @@
#include "coding/write_to_sink.hpp"
#include "coding/internal/file_data.hpp"
+#include "std/cstring.hpp"
+
#ifndef OMIM_OS_WINDOWS
#include <errno.h>
#include <stdio.h>
@@ -122,7 +124,7 @@ void MappedFile::Open(string const & fName)
#else
m_fd = open(fName.c_str(), O_RDONLY | O_NONBLOCK);
if (m_fd == -1)
- MYTHROW(Reader::OpenException, ("Can't open file:", fName));
+ MYTHROW(Reader::OpenException, ("Can't open file:", fName, ", reason:", strerror(errno)));
#endif
}