We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4db6f75 commit 9e89316Copy full SHA for 9e89316
1 file changed
scripts/termux-share
@@ -42,8 +42,16 @@ shift $(($OPTIND-1))
42
if [ $# -gt 1 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
43
44
if [ $# != 0 ]; then
45
+ FILE="$1"
46
+ if [ -f "$FILE" ]; then
47
+ FILE=`realpath "$FILE"`
48
+ fi
49
+
50
+ # Fix for issues on Android 8.1.
51
+ FILE=$(echo "$FILE" | sed 's/^\///')
52
53
# Note that the file path can contain whitespace.
- /data/data/com.termux/files/usr/libexec/termux-api Share $PARAMS --es file "`realpath "$1"`"
54
+ /data/data/com.termux/files/usr/libexec/termux-api Share $PARAMS --es file "$FILE"
55
else
56
/data/data/com.termux/files/usr/libexec/termux-api Share $PARAMS
57
fi
0 commit comments