Removed BaseOpt::check_logdir()
git-svn-id: https://svn.code.sf.net/p/porg/code/trunk@144 8854956c-c02d-4db9-8198-7e99b8e08f37
This commit is contained in:
parent
f090dfc5b4
commit
22e32c2dc8
|
@ -28,8 +28,6 @@ DB::DB()
|
|||
g_assert(s_initialized == false);
|
||||
g_assert(Opt::initialized());
|
||||
|
||||
Opt::check_logdir();
|
||||
|
||||
Gtk::MessageDialog dialog("Reading database (" + Opt::logdir() + ")", false,
|
||||
Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE, true);
|
||||
dialog.set_title("grop :: info");
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "config.h"
|
||||
#include "baseopt.h"
|
||||
#include "common.h" // for Error
|
||||
#include "rexp.h"
|
||||
#include <wordexp.h>
|
||||
#include <fstream>
|
||||
|
@ -53,13 +52,6 @@ BaseOpt::BaseOpt()
|
|||
}
|
||||
|
||||
|
||||
void BaseOpt::check_logdir()
|
||||
{
|
||||
if (in_paths(s_logdir, "/dev:/proc:/sys:/run"))
|
||||
throw Error(s_logdir + ": Invalid log directory");
|
||||
}
|
||||
|
||||
|
||||
bool BaseOpt::logdir_writable()
|
||||
{
|
||||
return !access(s_logdir.c_str(), W_OK);
|
||||
|
|
|
@ -21,13 +21,12 @@ class BaseOpt
|
|||
{
|
||||
public:
|
||||
|
||||
static std::string const& logdir() { return s_logdir; }
|
||||
static std::string const& include() { return s_include; }
|
||||
static std::string const& exclude() { return s_exclude; }
|
||||
static std::string const& logdir() { return s_logdir; }
|
||||
static std::string const& include() { return s_include; }
|
||||
static std::string const& exclude() { return s_exclude; }
|
||||
static std::string const& remove_skip() { return s_remove_skip; }
|
||||
|
||||
static bool logdir_writable();
|
||||
static void check_logdir();
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -315,8 +315,6 @@ Opt::Opt(int argc, char* argv[])
|
|||
|
||||
// Checkings
|
||||
|
||||
check_logdir();
|
||||
|
||||
switch (s_mode) {
|
||||
|
||||
case MODE_QUERY:
|
||||
|
|
Loading…
Reference in New Issue