Fix old reference to mount_to_fs

to instead get the handler object
This commit is contained in:
Darryl Nixon 2023-07-16 10:27:00 -07:00
parent f46611813c
commit bcdd085f91

View file

@ -1,6 +1,6 @@
from .classes import ShredDir
from .classes import ShredFile
from .fileops import mount_to_fs
from .fileops import mount_to_fs_handler
from .logs import logger
@ -16,13 +16,13 @@ async def main(job) -> bool:
if path.is_file():
logger.info(f"Adding file: {path}")
shred_file = ShredFile(path)
shred_file.fs_handler = await mount_to_fs(shred_file.mount_point)
shred_file.fs_handler = await mount_to_fs_handler(shred_file.mount_point)
new_paths.add(shred_file)
elif path.is_dir():
if job.recursive:
logger.info(f"Adding directory: {path}")
shred_dir = ShredDir(path)
shred_dir.fs_handler = await mount_to_fs(shred_dir.mount_point)
shred_dir.fs_handler = await mount_to_fs_handler(shred_dir.mount_point)
new_paths.add(shred_dir)
else:
logger.info(f"Skipping directory: {path} (try -r/--recursive)")