From d70bd0e03d72e7ace4a2b2382a0cd60dbf2e2b0e Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sat, 26 Aug 2006 14:19:18 +0000 Subject: FS#5884 Fix simulator file delete/rename with dircache. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10757 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/common/io.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'uisimulator') diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index e3ebe88a21..241bcfc3a1 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c @@ -43,7 +43,14 @@ #define MAX_PATH 260 #include + #include "debug.h" +#include "config.h" + +#ifdef HAVE_DIRCACHE +void dircache_remove(const char *name); +void dircache_rename(const char *oldpath, const char *newpath); +#endif #define SIMULATOR_ARCHOS_ROOT "archos" @@ -212,6 +219,10 @@ int sim_remove(const char *name) { char buffer[256]; /* sufficiently big */ +#ifdef HAVE_DIRCACHE + dircache_remove(name); +#endif + if(name[0] == '/') { sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); @@ -226,6 +237,10 @@ int sim_rename(const char *oldpath, const char* newpath) char buffer1[256]; char buffer2[256]; +#ifdef HAVE_DIRCACHE + dircache_rename(oldpath, newpath); +#endif + if(oldpath[0] == '/') { sprintf(buffer1, "%s%s", SIMULATOR_ARCHOS_ROOT, oldpath); sprintf(buffer2, "%s%s", SIMULATOR_ARCHOS_ROOT, newpath); -- cgit