mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
i'm a dunce
This commit is contained in:
parent
44595439ca
commit
ef6a2cecc4
1 changed files with 3 additions and 1 deletions
|
@ -78,7 +78,8 @@ async def main(job: argparse.Namespace) -> bool:
|
|||
tasks = []
|
||||
# scandir/glob/rglob doesn't play nice with FileNotFound errors,
|
||||
# so let's avoid them entirely for now in /proc, /dev, and /sys
|
||||
if mount_point == "/":
|
||||
if str(mount_point) == "/":
|
||||
logger.info("Root filesystem mount seen, skipping /proc, /dev, and /sys")
|
||||
async for item in mount_point.glob("*"):
|
||||
if await item.is_dir():
|
||||
if str(item) in IGNORE_GLOBAL:
|
||||
|
@ -90,6 +91,7 @@ async def main(job: argparse.Namespace) -> bool:
|
|||
else:
|
||||
tasks.append(check_inode_and_unlink(item, inodes))
|
||||
else:
|
||||
logger.info(f"Checking non-root filesystem mount: {str(mount_point)}")
|
||||
async for item in mount_point.rglob("*"):
|
||||
if any(str(item).startswith(str(path)) for path in job.ignoredir):
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue