From: František Dvořák Date: Wed, 23 Oct 2013 17:14:46 +0000 (+0200) Subject: Better to inicializa prefix fully in the constructor body. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=8bc4bbe309b69cf1e2b6e6bf0f96590dc5bd3632;p=dmlite-plugins-vfs-old.git Better to inicializa prefix fully in the constructor body. --- diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index 273cc3c..c3252c7 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -48,7 +48,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); @@ -56,6 +56,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; }