Fix issue #42: Skip base directories in bootclean.

Signed-off-by: Wang He <xw897002528@gmail.com>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Wang He authored and Joachim Nilsson committed 2016-10-02 11:07:54 +02:00
1 parent 07d767e1af
commit d2846b805a
1 file changed
+4 -2
+4 -2
View File
@@ -118,9 +118,11 @@ static int fsck(int pass)
return 0;
}
static int do_clean(const char *fpath, const struct stat *UNUSED(sb), int UNUSED(tflag), struct FTW *UNUSED(ftwbuf))
static int do_clean(const char *fpath, const struct stat *UNUSED(sb), int UNUSED(tflag), struct FTW *ftwbuf)
{
_d("Removing %s", fpath);
if (ftwbuf->level == 0)
return 1;
remove(fpath);
return 0;