Skip to content

Commit 3358fb4

Browse files
Support systems where %LocalAppData% contains a space
This can happen when the user's full name is used at %USERPROFILE%. Fixes: #72
1 parent c3181f4 commit 3358fb4

File tree

1 file changed

+2
-2
lines changed
  • distrod/distrod_wsl_launcher/src

1 file changed

+2
-2
lines changed

distrod/distrod_wsl_launcher/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ fn register_distribution<P: AsRef<Path>>(distro_name: &str, tar_gz_filename: P)
293293
.arg("wsl")
294294
.arg("--import")
295295
.arg(distro_name)
296-
.arg(format!("%LocalAppData%\\{}", distro_name))
296+
.arg(format!("\"%LocalAppData%\\{}\"", distro_name))
297297
.arg(tar_gz_filename.as_ref());
298298
let mut child = cmd
299299
.spawn()
@@ -305,7 +305,7 @@ fn register_distribution<P: AsRef<Path>>(distro_name: &str, tar_gz_filename: P)
305305
bail!(
306306
"Failed: cmd.exe /C wsl --import {} {} {:#?}",
307307
distro_name,
308-
format!("%LocalAppData%\\{}", distro_name),
308+
format!("\"%LocalAppData%\\{}\"", distro_name),
309309
tar_gz_filename.as_ref()
310310
);
311311
}

0 commit comments

Comments
 (0)