Fix removeDir() - no metadata check just for checking cwd.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Sat, 19 Oct 2013 19:15:59 +0000 (21:15 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Sun, 23 Feb 2014 13:16:19 +0000 (14:16 +0100)
src/VfsNs.cpp

index e18af57..09d4a6f 100644 (file)
@@ -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);