diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-04-06 15:16:07 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-04-06 15:18:06 +0200 |
commit | 2c8dd25a144184b68e184e363c6e7baf81b25067 (patch) | |
tree | 2d6ca3319d8f8c64f1a0d3a1e03faac5e5db6561 | |
parent | 04fd5f0e48a0118e91c20c1725ec9f69c8f52b1e (diff) |
Print "better" message when $file can't be read
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | fb.in | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |