mirror of
https://github.com/troglobit/finit.git
synced 2026-11-08 16:11:10 +00:00
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:
1 parent
07d767e1af
commit
d2846b805a
1 file changed
+4
-2
@@ -118,9 +118,11 @@ static int fsck(int pass)
|
|||||||
return 0;
|
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);
|
remove(fpath);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in new issue
Block a user