~mdw
/
termux-packages
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pass: Fix gpg -> gnupg
[termux-packages]
/
packages
/
termux-api
/
termux-share
diff --git
a/packages/termux-api/termux-share
b/packages/termux-api/termux-share
index
e083272
..
1c08188
100755
(executable)
--- a/
packages/termux-api/termux-share
+++ b/
packages/termux-api/termux-share
@@
-1,4
+1,4
@@
-#!/
system/
bin/sh
+#!/bin/sh
show_usage () {
echo "usage: termux-share [options] [file]"
show_usage () {
echo "usage: termux-share [options] [file]"
@@
-43,6
+43,10
@@
esac
done
if [ $# -gt 1 ]; then echo "Only one file can be shared"; exit 1; fi
done
if [ $# -gt 1 ]; then echo "Only one file can be shared"; exit 1; fi
-if [ $# != 0 ]; then PARAMS="$PARAMS --es file `realpath $1`"; fi
-termux-api Share $PARAMS
+if [ $# != 0 ]; then
+ # Note that the file path can contain whitespace.
+ @TERMUX_API@ Share $PARAMS --es file "`realpath "$1"`"
+else
+ @TERMUX_API@ Share $PARAMS
+fi