diff options
author | Slatian <baschdel@disroot.org> | 2023-10-04 18:55:27 +0200 |
---|---|---|
committer | Simon Lees <simon@simotek.net> | 2023-10-11 05:30:50 +0000 |
commit | fa2b74f11f7d9486a2394c3919901c889ef37e08 (patch) | |
tree | 2325e2e5acf3aca0c708a50805da2d51f357f99d | |
parent | e1ff71005514c11508e233f096afcbce0394a95d (diff) |
Apply patch* from issue #230, thanks Najib Idrissi
* which was replaced with command -v
-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 |