From: mbaudier Date: Mon, 25 Jun 2018 09:42:01 +0000 (+0200) Subject: Do not throw an exception if node exists and is not an NT_FOLDER X-Git-Tag: argeo-commons-2.1.74~15 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=44fe42fa99656eabfdb4c466887f8f5f2f95c510;p=lgpl%2Fargeo-commons.git Do not throw an exception if node exists and is not an NT_FOLDER --- diff --git a/org.argeo.jcr/src/org/argeo/jcr/fs/JcrFileSystemProvider.java b/org.argeo.jcr/src/org/argeo/jcr/fs/JcrFileSystemProvider.java index f1065be40..04d1342bf 100644 --- a/org.argeo.jcr/src/org/argeo/jcr/fs/JcrFileSystemProvider.java +++ b/org.argeo.jcr/src/org/argeo/jcr/fs/JcrFileSystemProvider.java @@ -30,7 +30,6 @@ import javax.jcr.Session; import javax.jcr.nodetype.NodeType; import javax.jcr.nodetype.PropertyDefinition; -import org.apache.commons.io.FileExistsException; import org.argeo.jcr.JcrUtils; public abstract class JcrFileSystemProvider extends FileSystemProvider { @@ -91,8 +90,8 @@ public abstract class JcrFileSystemProvider extends FileSystemProvider { node.addMixin(NodeType.MIX_LAST_MODIFIED); node.getSession().save(); } else { - if (!node.getPrimaryNodeType().isNodeType(NodeType.NT_FOLDER)) - throw new FileExistsException(dir + " exists and is not a directory"); + // if (!node.getPrimaryNodeType().isNodeType(NodeType.NT_FOLDER)) + // throw new FileExistsException(dir + " exists and is not a directory"); } } catch (RepositoryException e) { discardChanges(node);