From 07649827dad4fc9f57def293cae49e5ad2e1b562 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Wed, 23 Oct 2013 19:14:46 +0200 Subject: [PATCH] Better to inicializa prefix fully in the constructor body. --- src/VfsNs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index fd25f64..efdc8a2 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -34,7 +34,7 @@ static gid_t getGid(const SecurityContext* ctx) { VfsCatalog::VfsCatalog(const std::string& host, const std::string& prefix, const std::string &allow, const std::string &deny, const std::string allowWrite, const std::string denyWrite) throw (DmException): Catalog(), - hostName_(host), prefix_(prefix) + hostName_(host) { this->allowRegex = vfsCompileRegex("Allow", allow); this->denyRegex = vfsCompileRegex("Deny", deny); @@ -42,6 +42,7 @@ VfsCatalog::VfsCatalog(const std::string& host, const std::string& prefix, const this->denyWriteRegex = vfsCompileRegex("DenyWrite", denyWrite); if (prefix.empty()) this->prefix_ = ""; + else this->prefix_ = prefix; } -- 1.8.2.3