summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e3ebe88..241bcfc 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);