Skip to content

Commit

Permalink
Merge pull request #22 from jbms/fix-device-symlinks
Browse files Browse the repository at this point in the history
Resolve block device symlinks
  • Loading branch information
JackKelly authored Nov 13, 2023
2 parents 36f9620 + f43d0ae commit 9d3f274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/perfcapture/performance_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _get_partition_name_from_path(dataset_path: pathlib.Path) -> str:
partitions: list[psutil._common.sdiskpart] = psutil.disk_partitions()
for partition in partitions:
if pathlib.Path(partition.mountpoint) == dataset_mount_point:
return pathlib.Path(partition.device).parts[-1]
return pathlib.Path(partition.device).resolve().parts[-1]
raise RuntimeError(f"Could not find partition for {dataset_path}")


Expand Down

0 comments on commit 9d3f274

Please sign in to comment.