From 191811943018dee4e3034adf034553ac2b0a0f2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 13 Oct 2013 20:38:39 +0200 Subject: [PATCH] More friendly error message for makeDir(""). --- src/VfsNs.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index 26793dd..c7c6b92 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -673,6 +673,9 @@ void VfsCatalog::makeDir(const std::string& path, mode_t mode) throw (DmExceptio { std::string parentPath, name; + if (path.empty()) + vfsThrow(EINVAL, "empty directory name"); + ExtendedStat parent = this->getParent(path, &parentPath, &name); if (checkPermissions(this->secCtx_, parent.acl, parent.stat, S_IEXEC) != 0) -- 1.8.2.3