nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.9k stars 91 forks source link

[Bug]: distrod_wsl_launcher fails if the user profile folder within Windows includes a space in name #37

Open akuropka opened 2 years ago

akuropka commented 2 years ago

Describe the bug

Import of the rootfs-image fails if the user profile folder within Windows includes a space such as Test User (derivated from a local user account name).

Steps to reproduce

Prerequisites: distrod_wsl_launcher v0.1.5 Profile folder in Windows consisting out of two words.

Steps: Start distrod_wsl_launcher an select an image or use a local file.

Expected behavior

WSL distro will be imported and installed.

Windows version

Microsoft Windows [Version 10.0.22000.466]

Linux kernel version

Linux 5.10.93.3-microsoft-WSL2 #1 SMP Sun Jan 23 18:53:16 CET 2022 x86_64 GNU/Linux

Distro

archlinux

How did you install that distro?

Installed by Distrod wizard

Logs

[Distrod][ERROR] Failed to register the distribution. Caused by: Failed: cmd.exe /C wsl --import Distrod %LocalAppData%\Distrod "C:\TEMP\system\.tmp2OMAbF\install.tar.gz"

additional comment

Fix: Put the install location inside brackets. %LocalAppData%\Distrod -> "%LocalAppData%\Distrod"

sabrsorensen commented 2 years ago

I'm also experiencing this issue, not sure of a way to work around it.

titogarcia commented 2 years ago

This is happening to me as well. Is there any possible workaround?

akuropka commented 2 years ago

E.g. you need to temporarily change the LocalAppData variable to the 8.3 name of your userfolder.

gitrojones commented 2 years ago

To supplement the above with what worked for me: