diff options
author | Nils Wallménius <nils@rockbox.org> | 2008-04-16 19:51:43 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2008-04-16 19:51:43 +0000 |
commit | a01996436d09eca8ae114e67005d2cac73cae7b3 (patch) | |
tree | 013d6787d3c03265049536677e817572c4285119 /apps/recorder | |
parent | d65930f9720b0d51313b0e76251e56d2ffa144dd (diff) |
Use file_exists and dir_exists functions where appropriate, fix one wrong file descriptor check and one possible dir descriptor leak
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17147 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/radio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 8d9b77cdc7..e103c6bc82 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -1211,9 +1211,9 @@ static int save_preset_list(void) { bool bad_file_name = true; - if(!opendir(FMPRESET_PATH)) /* Check if there is preset folder */ - mkdir(FMPRESET_PATH); - + if(!dir_exists(FMPRESET_PATH)) /* Check if there is preset folder */ + mkdir(FMPRESET_PATH); + create_numbered_filename(filepreset, FMPRESET_PATH, "preset", ".fmr", 2 IF_CNFN_NUM_(, NULL)); |