Skip to content

Commit 487fd9d

Browse files
committed
filesystem_type: handle spaces
1 parent 38b3c94 commit 487fd9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

+stdlib/+sys/filesystem_type.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
if ispc()
88
dl = extractBefore(stdlib.absolute(p), 2);
9-
cmd = "pwsh -c (Get-Volume -DriveLetter " + dl + ").FileSystem";
9+
cmd = sprintf('pwsh -c (Get-Volume -DriveLetter "%s").FileSystem', dl);
1010
elseif ismac()
11-
cmd = "df -aHY " + p + " | awk 'NR==2 {print $2}'";
11+
cmd = sprintf('df -aHY "%s" | awk ''NR==2 {print $2}''', p);
1212
else
13-
cmd = "df --output=fstype " + p + " | tail -n 1";
13+
cmd = sprintf('df --output=fstype "%s" | tail -n 1', p);
1414
end
1515

1616
[s, t] = system(cmd);

0 commit comments

Comments
 (0)