diff options
| author | Robert Kukla <roolku@rockbox.org> | 2007-11-21 21:28:27 +0000 |
|---|---|---|
| committer | Robert Kukla <roolku@rockbox.org> | 2007-11-21 21:28:27 +0000 |
| commit | d87b037efe7d001902c0cde992e1633ff9f70061 (patch) | |
| tree | ddea298e51d73443aad0d31fca7d59311444efab /apps/recorder | |
| parent | a2ad8537af659972b2e859c99c0ff75e374b73f9 (diff) | |
| download | rockbox-d87b037efe7d001902c0cde992e1633ff9f70061.zip rockbox-d87b037efe7d001902c0cde992e1633ff9f70061.tar.gz rockbox-d87b037efe7d001902c0cde992e1633ff9f70061.tar.bz2 rockbox-d87b037efe7d001902c0cde992e1633ff9f70061.tar.xz | |
consolidate the 3 file_exists() functions into one; use the version that explicitly uses dircache; give dir_exists() the same treatment for consistency
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15742 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
| -rw-r--r-- | apps/recorder/albumart.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index d99280c..6aaf388 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c @@ -26,6 +26,7 @@ #include "buffering.h" #include "dircache.h" #include "debug.h" +#include "misc.h" /* Strip filename from a full path @@ -89,26 +90,6 @@ static char* strip_extension(char* buf, int buf_size, const char* file) return buf; } -/* Test file existence, using dircache of possible */ -static bool file_exists(const char *file) -{ - int fd; - - if (!file || strlen(file) <= 0) - return false; - -#ifdef HAVE_DIRCACHE - if (dircache_is_enabled()) - return (dircache_get_entry_ptr(file) != NULL); -#endif - - fd = open(file, O_RDONLY); - if (fd < 0) - return false; - close(fd); - return true; -} - /* Make sure part of path only contain chars valid for a FAT32 long name. * Double quotes are replaced with single quotes, other unsupported chars * are replaced with an underscore. |