Skip to content

Commit

Permalink
Fix: mounting point containing a space character interpreted incorrec…
Browse files Browse the repository at this point in the history
…tly.
  • Loading branch information
petersulyok committed Mar 10, 2024
1 parent c475707 commit 8cb5951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diskinfo/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def __init__(self, name: str, dev_id: str) -> None:
# Parse output: find free size and mounting point
output_lines = result.stdout.splitlines()
for line in output_lines:
items = re.sub(r"\s+", " ", line).split()
items = re.sub(r"\s+", " ", line).split(maxsplit=2)
if items[0] == self.__path:
self.__fs_free_size = int(items[1])
self.__fs_mounting_point = items[2]
Expand Down

0 comments on commit 8cb5951

Please sign in to comment.