Skip to content

Commit 1e61ea2

Browse files
committed
chore: avoid repeating the curdir computation
1 parent e7c8d7b commit 1e61ea2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cuda_bindings/tests/test_cufile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def cufileVersionLessThan(target):
9494
def isSupportedFilesystem():
9595
"""Check if the current filesystem is supported (ext4 or xfs)."""
9696
try:
97+
current_dir = os.getcwd()
9798
# Try to get filesystem type from /proc/mounts
9899
with open("/proc/mounts") as f:
99100
for line in f:
@@ -103,7 +104,6 @@ def isSupportedFilesystem():
103104
fs_type = parts[2]
104105

105106
# Check if current directory is under this mount point
106-
current_dir = os.path.abspath(".")
107107
if current_dir.startswith(mount_point):
108108
fs_type_lower = fs_type.lower()
109109
logging.info(f"Current filesystem type: {fs_type_lower}")

0 commit comments

Comments
 (0)