mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:00:11 +01:00
parent
7b0f93edf6
commit
052a93fc3d
@ -27,7 +27,7 @@ int import_from_maildir(struct session_data *sdata, struct data *data, char *dir
|
|||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
int rc=ERR, ret=OK, i=0;
|
int rc=ERR, ret=OK, i=0;
|
||||||
int folder;
|
int folder;
|
||||||
char *p;
|
char *p, subdir[SMALLBUFSIZE];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
dir = opendir(directory);
|
dir = opendir(directory);
|
||||||
@ -45,7 +45,8 @@ int import_from_maildir(struct session_data *sdata, struct data *data, char *dir
|
|||||||
if(stat(data->import->filename, &st) == 0){
|
if(stat(data->import->filename, &st) == 0){
|
||||||
if(S_ISDIR(st.st_mode)){
|
if(S_ISDIR(st.st_mode)){
|
||||||
folder = data->folder;
|
folder = data->folder;
|
||||||
rc = import_from_maildir(sdata, data, data->import->filename, cfg);
|
snprintf(subdir, sizeof(subdir)-1, "%s", data->import->filename);
|
||||||
|
rc = import_from_maildir(sdata, data, subdir, cfg);
|
||||||
data->folder = folder;
|
data->folder = folder;
|
||||||
if(rc == ERR) ret = ERR;
|
if(rc == ERR) ret = ERR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user