diff --git a/uisimulator/x11/dir.h b/uisimulator/x11/dir.h index 17058eafb2..b0eec77eb3 100644 --- a/uisimulator/x11/dir.h +++ b/uisimulator/x11/dir.h @@ -42,6 +42,7 @@ extern int x11_mkdir(char *name, int mode); #define readdir(x) x11_readdir(x) #define closedir(x) x11_closedir(x) #define mkdir(x, y) x11_mkdir(x, y) +#define rmdir(x) x11_rmdir(x) #endif diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c index 72a7319ec6..faccc826a7 100644 --- a/uisimulator/x11/io.c +++ b/uisimulator/x11/io.c @@ -146,6 +146,18 @@ int x11_mkdir(const char *name, mode_t mode) return (mkdir)(name, 0666); } +int x11_rmdir(const char *name) +{ + char buffer[256]; /* sufficiently big */ + if(name[0] == '/') { + sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); + + debugf("We remove the real directory '%s'\n", buffer); + return (rmdir)(buffer); + } + return (rmdir)(name); +} + int x11_remove(char *name) { char buffer[256]; /* sufficiently big */