1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 17:21:42 +00:00

Check for non-empty files, not just existance

This commit is contained in:
Sorin Ionescu
2012-04-16 14:21:29 -04:00
parent 3ed8265e28
commit e5ec94af42
13 changed files with 14 additions and 14 deletions

View File

@ -7,8 +7,8 @@
#
local config_file="$HOME/.wakeonlan/$1"
if [[ ! -f "$config_file" ]]; then
print "$0: no such device file: $1" >&2
if [[ ! -s "$config_file" ]]; then
print "$0: invalid device file: $1" >&2
return 1
fi