update: better handling of the keep files
This commit is contained in:
@ -40,7 +40,7 @@ bool lm_pool_info_load(lm_pool_t *pool) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!exists(pool->info_file) || !can_read(pool->info_file)){
|
||||
if(!exists(pool->info_file, NULL) || !can_read(pool->info_file)){
|
||||
lm_error_set(LM_ERR_PoolInfoCantRead);
|
||||
return false;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ bool lm_pool_list_load(lm_pool_t *pool, char *dir){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!exists(pool->list_file) || !can_read(pool->list_file)){
|
||||
if(!exists(pool->list_file, NULL) || !can_read(pool->list_file)){
|
||||
lm_error_set(LM_ERR_PoolListCantRead);
|
||||
return false;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ bool lm_pool_path_set_dir(lm_pool_t *pool, char *dir){
|
||||
if(NULL == dir)
|
||||
return true;
|
||||
|
||||
if(exists(dir) && (is_file(dir) || !can_read(dir) || !can_write(dir))){
|
||||
if(exists(dir, NULL) && (is_file(dir) || !can_read(dir) || !can_write(dir))){
|
||||
lm_error_set(LM_ERR_PoolBadDir);
|
||||
return false;
|
||||
}
|
||||
@ -26,12 +26,12 @@ bool lm_pool_path_set_dir(lm_pool_t *pool, char *dir){
|
||||
pool->info_file = join_alloc(dir, "INFO");
|
||||
pool->list_file = join_alloc(dir, "LIST");
|
||||
|
||||
if(exists(pool->info_file) && (!is_file(pool->info_file) || !can_read(pool->info_file) || !can_write(pool->info_file))){
|
||||
if(exists(pool->info_file, NULL) && (!is_file(pool->info_file) || !can_read(pool->info_file) || !can_write(pool->info_file))){
|
||||
lm_error_set(LM_ERR_PoolBadPaths);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(exists(pool->list_file) && (!is_file(pool->list_file) || !can_read(pool->list_file) || !can_write(pool->list_file))){
|
||||
if(exists(pool->list_file, NULL) && (!is_file(pool->list_file) || !can_read(pool->list_file) || !can_write(pool->list_file))){
|
||||
lm_error_set(LM_ERR_PoolBadPaths);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user