add protection for an empty share to protect against https://bugs.amahi.org/issues/1447