Skip to content

Commit

Permalink
Merge pull request #1 from crramirez/patch-2
Browse files Browse the repository at this point in the history
Patch 2
  • Loading branch information
crramirez committed Jun 2, 2020
2 parents b203791 + a814be7 commit b40b77d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wslu-header
Expand Up @@ -156,7 +156,7 @@ function baseexec_gen {
wslutmpbuild="$(( $wslutmpbuild + 0 ))"
if [ $wslutmpbuild -ge $BN_MAY_NINETEEN ]; then
# The environment variable only available in 19H1 or later.
wslu_distro_regpath=$("$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss" /s /f DistributionName 2>&1 | grep -B1 -e "$WSL_DISTRO_NAME" | head -n1 | sed -e 's|\r||g')
wslu_distro_regpath=$("$(interop_prefix)"c/Windows/System32/reg.exe query "HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss" /s /f DistributionName 2>&1 | sed -e 's|\r||g' | grep -B1 -e "$WSL_DISTRO_NAME$" | head -n1 )
if "$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "$wslu_distro_regpath" /v PackageFamilyName &>/dev/null; then
wslu_distro_packagename=$("$(interop_prefix)$(sysdrive_prefix)"/Windows/System32/reg.exe query "$wslu_distro_regpath" /v PackageFamilyName | tail -n 2 | head -n 1 | sed -e 's|\r||g')
# if it is a store distro
Expand Down Expand Up @@ -228,6 +228,7 @@ case $distro in
Arch*) distro="archlinux";;
*Oracle*) distro="oracle";;
Scientific*) distro="scilinux";;
*Fedora\ Remix\ for\ WSL*) distro="fedoraremix";;
*Fedora*) distro="fedora";;
*Generic*) [ "fedora" == "$(grep -e "LIKE=" /etc/os-release | sed -e 's/ID_LIKE=//g')" ] && distro="oldfedora" || distro="unknown";;
*) distro="unknown";;
Expand Down
1 change: 1 addition & 0 deletions src/wslview.sh
Expand Up @@ -53,6 +53,7 @@ if [[ "$lname" != "" ]]; then
fi
elif [[ $lname =~ ^(/[^/]+)*(/)?$ ]]; then
if [ $wslutmpbuild -ge "$BN_MAY_NINETEEN" ]; then
properfile_full_path="$(readlink -f "${lname}")"
converted_file_path="\\\\wsl\$\\$WSL_DISTRO_NAME${properfile_full_path//\//\\}"
winps_exec Start "\"$converted_file_path\""
else
Expand Down

0 comments on commit b40b77d

Please sign in to comment.