summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-08-26 14:19:18 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-08-26 14:19:18 +0000
commitd70bd0e03d72e7ace4a2b2382a0cd60dbf2e2b0e (patch)
tree130683f7f691be3bdc138ec364e4e06c2b96a2d1 /uisimulator
parentdd87c364a08b796873faab7f95552dcaa93b38e0 (diff)
downloadrockbox-d70bd0e03d72e7ace4a2b2382a0cd60dbf2e2b0e.tar.gz
rockbox-d70bd0e03d72e7ace4a2b2382a0cd60dbf2e2b0e.tar.bz2
rockbox-d70bd0e03d72e7ace4a2b2382a0cd60dbf2e2b0e.zip
FS#5884 Fix simulator file delete/rename with dircache.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10757 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/io.c15
1 files changed, 15 insertions, 0 deletions
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 <fcntl.h>
+
#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);