From: František Dvořák Date: Fri, 18 Oct 2013 14:58:17 +0000 (+0200) Subject: More elaborate error messages in removeDir(). X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=c5a95cd083cd94394a4accc903dfe9aa9e8d04b4;p=dmlite-plugins-vfs-old.git More elaborate error messages in removeDir(). --- diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index 4031d58..43fb293 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -1216,14 +1216,14 @@ void VfsCatalog::removeDir(const std::string& path) throw (DmException) // check if we are not removing current working directory cwd = get_current_dir_name(); try { - wrapCall(::chdir(lpath.c_str())); + wrapCall(::chdir(lpath.c_str()), "could not change directory to '%s'", path.c_str()); rmd = get_current_dir_name(); if (strcmp(cwd, rmd) == 0) { vfsThrow(EINVAL, "can not remove current working directory"); } ::chdir(cwd); // OK, we can try to remove - wrapCall(rmdir(lpath.c_str())); + wrapCall(rmdir(lpath.c_str()), "could not remove directory '%s'", path.c_str()); } catch (...) { if (cwd) ::chdir(cwd); free(cwd);