BigW Consortium Gitlab

Commit 47556f22 by Gabor Kiss-Vamosi

lv_ufs_remove: check file existance

parent 531eb4b4
......@@ -196,10 +196,11 @@ lv_fs_res_t lv_ufs_close (void * file_p)
lv_fs_res_t lv_ufs_remove(const char * fn)
{
lv_ufs_ent_t* ent = lv_ufs_ent_get(fn);
if(ent == NULL) return LV_FS_RES_DENIED; /*File not exists*/
/*Can not be deleted is opened*/
if(ent->oc != 0) return LV_FS_RES_DENIED;
lv_ll_rem(&file_ll, ent);
lv_mem_free(ent->fn_d);
ent->fn_d = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment