From eda6efe9893df0a720c7df2e5f6659f9099ea23f Mon Sep 17 00:00:00 2001 From: WaitukuNexx <64750108+Nexxus-LMT@users.noreply.github.com> Date: Sun, 15 May 2022 08:14:48 -0400 Subject: [PATCH] Update compact-wsl2-disk.ps1 simple fix for diskpart to recognize illegal namespaces if unable to select vdisk --- compact-wsl2-disk.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compact-wsl2-disk.ps1 b/compact-wsl2-disk.ps1 index 316ebbd..e2e17d4 100644 --- a/compact-wsl2-disk.ps1 +++ b/compact-wsl2-disk.ps1 @@ -46,7 +46,7 @@ foreach ($file in $files) { write-output "Compacting disk (starting diskpart)" @" -select vdisk file=$disk +select vdisk file='$disk' attach vdisk readonly compact vdisk detach vdisk @@ -59,4 +59,4 @@ exit } write-output "=======" -write-output "Compacting of $($files.count) file(s) complete" \ No newline at end of file +write-output "Compacting of $($files.count) file(s) complete"