FS#5884 Fix simulator file delete/rename with dircache.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10757 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dd87c364a0
commit
d70bd0e03d
1 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue