lib: debug-log moving / unlinking
This commit is contained in:
@ -209,7 +209,8 @@ clear_links(const std::string& path, DIR* dir)
|
|||||||
mu_warning("error unlinking {}: {}", fullpath, g_strerror(errno));
|
mu_warning("error unlinking {}: {}", fullpath, g_strerror(errno));
|
||||||
res = false;
|
res = false;
|
||||||
/* LCOV_EXCL_STOP*/
|
/* LCOV_EXCL_STOP*/
|
||||||
}
|
} else
|
||||||
|
mu_debug("unlinked linksdir {}", fullpath);
|
||||||
break;
|
break;
|
||||||
case DT_DIR: {
|
case DT_DIR: {
|
||||||
DIR* subdir{::opendir(fullpath.c_str())};
|
DIR* subdir{::opendir(fullpath.c_str())};
|
||||||
@ -263,6 +264,8 @@ msg_move_verify(const std::string& src, const std::string& dst)
|
|||||||
mu_debug("source is still there ({}->{})", src, dst);
|
mu_debug("source is still there ({}->{})", src, dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mu_debug("moved {} -> {}", src, dst);
|
||||||
|
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
/* LCOV_EXCL_STOP*/
|
/* LCOV_EXCL_STOP*/
|
||||||
|
|||||||
@ -102,7 +102,6 @@ struct OutputStream {
|
|||||||
quote(fname_);
|
quote(fname_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete file, if any. Only do this when the OutputStream is no
|
* Delete file, if any. Only do this when the OutputStream is no
|
||||||
* longer needed.
|
* longer needed.
|
||||||
@ -112,6 +111,8 @@ struct OutputStream {
|
|||||||
return;
|
return;
|
||||||
if (auto&&res{::unlink(fname_.c_str())}; res != 0)
|
if (auto&&res{::unlink(fname_.c_str())}; res != 0)
|
||||||
mu_warning("failed to unlink '{}'", ::strerror(res));
|
mu_warning("failed to unlink '{}'", ::strerror(res));
|
||||||
|
else
|
||||||
|
mu_debug("unlinked output-stream {}", fname_);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -1076,6 +1077,9 @@ Server::Private::remove_handler(const Command& cmd)
|
|||||||
|
|
||||||
if (!store().remove_message(path))
|
if (!store().remove_message(path))
|
||||||
mu_warning("failed to remove message @ {} ({}) from store", path, docid);
|
mu_warning("failed to remove message @ {} ({}) from store", path, docid);
|
||||||
|
else
|
||||||
|
mu_debug("removed message @ {} @ ({})", path, docid);
|
||||||
|
|
||||||
output_sexp(Sexp().put_props(":remove", docid)); // act as if it worked.
|
output_sexp(Sexp().put_props(":remove", docid)); // act as if it worked.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user