sane-open: fallback to URI instead of file when we cant do anything more specialized

This commit is contained in:
2024-08-01 18:52:06 +00:00
parent 659da66106
commit f16066549f

View File

@@ -4,7 +4,7 @@
set -e set -e
usage() { usage() {
echo "usage: sane-open [options] <org.my.desktop | /path/to/file>" echo "usage: sane-open [options] <org.my.desktop | /path/to/file | URI>"
echo "given some resource, ask the xdg-desktop-portal service to open it" echo "given some resource, ask the xdg-desktop-portal service to open it"
echo "this could be either the name of an application, or a URI identifying a file" echo "this could be either the name of an application, or a URI identifying a file"
echo echo
@@ -236,8 +236,8 @@ if [ -z "$resourceType" ]; then
log "detected resourceType=application (warning: '$resource' is not visible on disk)" log "detected resourceType=application (warning: '$resource' is not visible on disk)"
resourceType=application resourceType=application
else else
log "detected resourceType=file (warning: '$resource' is not visible on disk)" log "unknown resource; treating as URI: $resource"
resourceType=file resourceType=uri
fi fi
fi fi