treat file:// as an fs target
This commit is contained in:
parent
69cbb6f286
commit
a4286e8b6c
4
sx-open
4
sx-open
|
@ -21,7 +21,7 @@ handle_uri() {
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_fs_target() {
|
handle_fs_target() {
|
||||||
local target="$1"
|
local target="${1##*file://}"
|
||||||
|
|
||||||
[[ -e "$target" ]] || return 1
|
[[ -e "$target" ]] || return 1
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ main() {
|
||||||
target="$1"
|
target="$1"
|
||||||
[[ "$target" ]] || { usage; exit; }
|
[[ "$target" ]] || { usage; exit; }
|
||||||
|
|
||||||
if [[ -e "$target" ]]; then
|
if [[ -e "$target" || "$target" == 'file://'* ]]; then
|
||||||
handle_fs_target "$target"
|
handle_fs_target "$target"
|
||||||
else
|
else
|
||||||
handle_uri "$target"
|
handle_uri "$target"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user