diff options
-rwxr-xr-x | scripts/xdg-open.in | 10 | ||||
-rw-r--r-- | scripts/xdg-utils-common.in | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index 63dbb81..2620959 100755 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -442,9 +442,13 @@ open_envvar() open_wsl() { - local win_path="$(wslpath -w "$1")" - [ $? -eq 0 ] || exit_failure_operation_failed - powershell.exe start "${win_path}" + if [[ "$1" =~ '^[a-zA-Z]+://' ]]; then + local win_path="$1" + else + local win_path="$(wslpath -aw "$1")" + [ $? -eq 0 ] || exit_failure_operation_failed + fi + explorer.exe "${win_path}" if [ $? -eq 0 ]; then exit_success diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in index aff250e..ff39396 100644 --- a/scripts/xdg-utils-common.in +++ b/scripts/xdg-utils-common.in @@ -351,7 +351,7 @@ detectDE() ;; Linux) grep -q microsoft /proc/version > /dev/null 2>&1 && \ - which powershell.exe > /dev/null 2>&1 && \ + command -v explorer.exe > /dev/null 2>&1 && \ DE=wsl; ;; esac |