From e1e09db955ad956fb4f9a4fcefec419f184b7e3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sat, 19 Oct 2013 21:15:59 +0200 Subject: [PATCH] Fix removeDir() - no metadata check just for checking cwd. --- src/VfsNs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VfsNs.cpp b/src/VfsNs.cpp index e18af57..09d4a6f 100644 --- a/src/VfsNs.cpp +++ b/src/VfsNs.cpp @@ -1222,14 +1222,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()), "could not change directory to '%s'", path.c_str()); + wrapCall(::chdir(lpath.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()), "could not remove directory '%s'", path.c_str()); + wrapCall(rmdir(lpath.c_str())); } catch (...) { if (cwd) ::chdir(cwd); free(cwd); -- 1.8.2.3