[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 6b12993: Fix defect introduced 20170110T1221Z
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 6b12993: Fix defect introduced 20170110T1221Z: unit-test failure (VZ) |
Date: |
Tue, 10 Jan 2017 19:30:16 +0000 (UTC) |
branch: master
commit 6b129932912265b478b8fe37d19b1a6569535485
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Fix defect introduced 20170110T1221Z: unit-test failure (VZ)
See:
http://lists.nongnu.org/archive/html/lmi/2017-01/msg00037.html
---
rate_table.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/rate_table.cpp b/rate_table.cpp
index 0106078..9bb9435 100644
--- a/rate_table.cpp
+++ b/rate_table.cpp
@@ -2476,6 +2476,13 @@ class database_impl
database_impl::database_impl(fs::path const& path)
:path_(path)
{
+ if(path_.empty())
+ {
+ // This ctor can be explicitly used with an empty path to create a
+ // database not (yet) associated with any physical file.
+ return;
+ }
+
fs::path const index_path = get_index_path(path);
fs::ifstream ifs(index_path, ios_in_binary());
if(!ifs) fatal_error() << "Unable to open '" << index_path << "'." <<
LMI_FLUSH;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master 6b12993: Fix defect introduced 20170110T1221Z: unit-test failure (VZ),
Greg Chicares <=