mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-26 12:29:58 +01:00
fixed a folder creation bug
This commit is contained in:
parent
4fac30507d
commit
a28a44b88d
@ -132,10 +132,10 @@ int import_mbox_from_dir(char *directory, struct session_data *sdata, struct __d
|
|||||||
if(S_ISREG(st.st_mode)){
|
if(S_ISREG(st.st_mode)){
|
||||||
if(i == 0 && data->recursive_folder_names == 1){
|
if(i == 0 && data->recursive_folder_names == 1){
|
||||||
folder = get_folder_id(sdata, data, fname, data->folder);
|
folder = get_folder_id(sdata, data, fname, data->folder);
|
||||||
if(folder == 0){
|
if(folder == -1){
|
||||||
folder = add_new_folder(sdata, data, fname, data->folder);
|
folder = add_new_folder(sdata, data, fname, data->folder);
|
||||||
|
|
||||||
if(folder == 0){
|
if(folder == -1){
|
||||||
printf("error: cannot get/add folder '%s' to parent id: %d\n", fname, data->folder);
|
printf("error: cannot get/add folder '%s' to parent id: %d\n", fname, data->folder);
|
||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
@ -208,10 +208,10 @@ int import_from_maildir(char *directory, struct session_data *sdata, struct __da
|
|||||||
}
|
}
|
||||||
|
|
||||||
folder = get_folder_id(sdata, data, p, data->folder);
|
folder = get_folder_id(sdata, data, p, data->folder);
|
||||||
if(folder == 0){
|
if(folder == -1){
|
||||||
folder = add_new_folder(sdata, data, p, data->folder);
|
folder = add_new_folder(sdata, data, p, data->folder);
|
||||||
|
|
||||||
if(folder == 0){
|
if(folder == -1){
|
||||||
printf("error: cannot get/add folder '%s' to parent id: %d\n", p, data->folder);
|
printf("error: cannot get/add folder '%s' to parent id: %d\n", p, data->folder);
|
||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user