summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-04-06 15:16:07 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-04-06 15:18:06 +0200
commit2c8dd25a144184b68e184e363c6e7baf81b25067 (patch)
tree2d6ca3319d8f8c64f1a0d3a1e03faac5e5db6561
parent04fd5f0e48a0118e91c20c1725ec9f69c8f52b1e (diff)
Print "better" message when $file can't be read
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--fb.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/fb.in b/fb.in
index 0380777..bd15407 100644
--- a/fb.in
+++ b/fb.in
@@ -119,8 +119,9 @@ do_upload() {
basefilename="`basename -- "$file"`"
basedirname="`dirname -- "$file"`"
- if [ ! -e "$file" ]; then
- echo "Error: File \"$file\" doesn't exist" >&2
+ if [ ! -r "$file" ]; then
+ # sh doesn't have perror so this message can't be more precise
+ echo "Error: File \"$file\" is not readable/not found." >&2
return 1
fi