1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Nils Wallménius 2008-04-16 19:51:43 +00:00
parent d65930f972
commit a01996436d
8 changed files with 18 additions and 52 deletions

View file

@ -574,13 +574,10 @@ static void init(void)
#ifdef AUTOROCK
{
int fd;
static const char filename[] = PLUGIN_APPS_DIR "/autostart.rock";
fd = open(filename, O_RDONLY);
if(fd >= 0) /* no complaint if it doesn't exist */
if(file_exists(filename)) /* no complaint if it doesn't exist */
{
close(fd);
plugin_load((char*)filename, NULL); /* start if it does */
}
}