/
0004-lca-support.patch
41 lines (36 loc) · 1.12 KB
/
0004-lca-support.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 23 Jan 2018 20:10:25 +0200
Subject: [PATCH] lca support
---
scripts/xdg-open.in | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
index feacc1f..4943163 100755
--- a/scripts/xdg-open.in
+++ b/scripts/xdg-open.in
@@ -482,6 +482,13 @@ open_generic()
check_input_file "$file"
+ if which lca-tool 2>/dev/null 1>&2; then
+ lca-tool --file --triggerdefault "$file"
+ if [ $? -eq 0 ]; then
+ exit_success
+ fi
+ fi
+
if has_display; then
filetype="$(xdg-mime query filetype "$file" | sed "s/;.*//")"
# passing a path a url is okay too,
@@ -504,6 +511,13 @@ open_generic()
fi
fi
+ if which lca-tool 2>/dev/null 1>&2; then
+ lca-tool --scheme --triggerdefault "$1"
+ if [ $? -eq 0 ]; then
+ exit_success
+ fi
+ fi
+
if has_display; then
open_generic_xdg_x_scheme_handler "$1"
fi