On Sat, 5 Dec 2015 12:19:53 +0100 "Eric Chatellier" <chatellier@codelutin.com> wrote:
Hi,
In multiples places in nuiton-utils, there is following code:
boolean b = dir.mkdirs(); if (!b) { throw new IOException("Could not create directory " + dir); }
This code is not correct, because mkdirs() can return false, without any errors, as the docs says: "return true if and only if the directory was created", so this can return false if directory already exists.
Can we remove this practice ?
Short answer no, since you don't give the code just above this one which is if (!dir.exist()) ...
This may also be the cause of this bug : http://forge.nuiton.org/issues/3195
_______________________________________________ Nuiton-utils-devel mailing list Nuiton-utils-devel@list.nuiton.org http://list.nuiton.org/cgi-bin/mailman/listinfo/nuiton-utils-devel
-- Tony Chemit -------------------- tél: +33 (0) 2 40 50 29 28 http://www.codelutin.com email: chemit@codelutin.com twitter: https://twitter.com/tchemit