Github user njhill commented on a diff in the pull request:

    https://github.com/apache/curator/pull/281#discussion_r231591529
  
    --- Diff: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentNode.java
 ---
    @@ -444,8 +447,19 @@ private void createNode()
     
             try
             {
    -            String existingPath = nodePath.get();
    -            String createPath = (existingPath != null && !useProtection) ? 
existingPath : basePath;
    +            String existingPath = nodePath.get(), createPath;
    +            if ( existingPath != null && !useProtection )
    +            {
    +                createPath = existingPath;
    +            }
    +            else
    +            {
    +                createPath = basePath;
    +                if ( useProtection && mode.isSequential() )
    +                {
    +                    createPath += 
existingPath.substring(existingPath.length()-SEQUENTIAL_SUFFIX_DIGITS);
    --- End diff --
    
    @cammckenzie :man_facepalming: apologies, now fixed!


---

Reply via email to