On Tue, Feb 28, 2012 at 06:42:59PM +0100, Julien Cristau wrote:
> > As a solution, I would suggest to take care of the "mkdir" return codes 
> > (line 36 and 50).  To do not change permissions on failures.         
> > 
> This script is set -e AFAICT, which means it already does care about the
> mkdir return code.

Yes but with the "-p" option, mkdir always return 0 (success):

  $ mkdir /tmp/dir
  $ mkdir /tmp/dir
  mkdir: cannot create directory `/tmp/dir': File exists
  $ echo $?
  1
  $ mkdir -p /tmp/dir
  $ echo $?
  0

I have a working PoC if needed.

Regards,
--
http://vladz.devzero.fr
PGP key 8F7E2D3C from pgp.mit.edu




-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120228180523.gb14...@devzero.fr

Reply via email to