mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
Implemented Shred*.get_inode() as an attribute instead
This commit is contained in:
parent
068d47703a
commit
911a45d2a8
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ class ShredDir(AsyncObject):
|
||||||
for path in self.contents:
|
for path in self.contents:
|
||||||
await path.delete_hardlinks_by_inode()
|
await path.delete_hardlinks_by_inode()
|
||||||
|
|
||||||
proc = await asyncio.create_subprocess_exec("find", str(self.mount_point), "-inum", self.get_inode(), "-delete")
|
proc = await asyncio.create_subprocess_exec("find", str(self.mount_point), "-inum", self.inode, "-delete")
|
||||||
stdout, _ = await proc.communicate()
|
stdout, _ = await proc.communicate()
|
||||||
|
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
|
@ -164,7 +164,7 @@ class ShredFile(AsyncObject):
|
||||||
return hash(self.absolute_path)
|
return hash(self.absolute_path)
|
||||||
|
|
||||||
async def delete_hardlinks_by_inode(self) -> None:
|
async def delete_hardlinks_by_inode(self) -> None:
|
||||||
proc = await asyncio.create_subprocess_exec("find", str(self.mount_point), "-inum", self.get_inode(), "-delete")
|
proc = await asyncio.create_subprocess_exec("find", str(self.mount_point), "-inum", self.inode, "-delete")
|
||||||
stdout, _ = await proc.communicate()
|
stdout, _ = await proc.communicate()
|
||||||
|
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
|
|
Loading…
Reference in a new issue