fixed a reindex vs. folder issue

This commit is contained in:
SJ 2014-02-19 15:16:20 +01:00
parent 7c1150052b
commit 3c4ed238f2

View File

@ -222,6 +222,13 @@ int main(int argc, char **argv){
initrules(data.archiving_rules); initrules(data.archiving_rules);
initrules(data.retention_rules); initrules(data.retention_rules);
init_session_data(&sdata, &cfg);
if(open_database(&sdata, &cfg) == ERR){
p_clean_exit("cannot connect to mysql server", 1);
}
if(folder){ if(folder){
data.folder = get_folder_id(&sdata, &data, folder, 0); data.folder = get_folder_id(&sdata, &data, folder, 0);
if(data.folder == 0){ if(data.folder == 0){
@ -230,13 +237,6 @@ int main(int argc, char **argv){
} }
} }
init_session_data(&sdata, &cfg);
if(open_database(&sdata, &cfg) == ERR){
p_clean_exit("cannot connect to mysql server", 1);
}
load_mydomains(&sdata, &data, &cfg); load_mydomains(&sdata, &data, &cfg);