remove fix
This commit is contained in:
parent
8efc204f30
commit
58598ccd35
|
@ -201,14 +201,16 @@ int games_remove(const char *path)
|
||||||
return 0;
|
return 0;
|
||||||
d = opendir(path);
|
d = opendir(path);
|
||||||
if (!d) {
|
if (!d) {
|
||||||
if (!access(path, F_OK))
|
if (!access(path, F_OK)) {
|
||||||
return unlink(path);
|
unlink(path);
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
while ((de = readdir(d))) {
|
while ((de = readdir(d))) {
|
||||||
/*if (de->d_type != DT_DIR)
|
char *p;
|
||||||
continue;*/
|
if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
|
||||||
p = getpath(path, de->d_name);
|
continue;
|
||||||
|
p = getfilepath(path, de->d_name);
|
||||||
if (p) {
|
if (p) {
|
||||||
games_remove(p);
|
games_remove(p);
|
||||||
free(p);
|
free(p);
|
||||||
|
@ -219,7 +221,6 @@ int games_remove(const char *path)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int motion_mode = 0;
|
static int motion_mode = 0;
|
||||||
static int motion_id = 0;
|
static int motion_id = 0;
|
||||||
static int motion_y = 0;
|
static int motion_y = 0;
|
||||||
|
|
Reference in a new issue