bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -e and permission denied


From: Eric Blake
Subject: Re: -e and permission denied
Date: Thu, 03 Oct 2013 17:24:35 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

On 10/03/2013 05:12 PM, address@hidden wrote:

>>
> I described use-case when user needs to *throw an error* when backup is 
> impossible.

If test -e fails, backup is impossible.  Throw an error in that case.

> 
> That's important to know that backup failed in this use-case.

I don't see the distinction.  Either you have access to a file to
attempt to back it up, or you don't.  It doesn't matter why you don't.
If you don't have access, then you cannot tell whether the file exists
or not.  So you might as well assume it does not exist, and write your
script to error out if a user feeds you a name that you cannot access.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]