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=07649827dad4fc9f57def293cae49e5ad2e1b562;p=dmlite-plugins-vfs.git Better to inicializa prefix fully in the constructor body. --- 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; }