mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

andrug
02.53.2008 af24d34127f8ccfe859cc23434ca73261e49d145
createFolder(): do not create folder if already exists
1 files modified
27 ■■■■■ changed files
opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml 27 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/system-tests/phases/shared/functions/stafcmd.xml
@@ -508,17 +508,39 @@
    </function-map-args>
    <sequence>
      <script>
        cmdRC = 0
      </script>
      <call function="'writeStartTagOperation'">
      { 'tagName' : 'createFolder',
        'fileFd'  : fileFd }
      </call>
      <call function="'isFile'">
      {
        'location' : location,
        'fileName' : foldername
      }
      </call>
      <script>
        fileExist = STAXResult
      </script>
      <if expr="fileExist == TRUE">
        <call function="'writeMessage'">
          {
            'content'  : '%s: Directory %s already exists, skip' %\
                         (location,foldername),
            'fileFd'   : fileFd
          }
        </call>
      <else>
        <sequence>
      <call function="'writeMessage'">
        {
          'content'  : 'Create directory %s on %s' % (foldername,location) ,
          'fileFd'   : fileFd
        }
      </call>
      <stafcmd name="'STAF Command: Create Folder'">
        <location>'%s' % location</location>
        <service>'fs'</service>
@@ -538,6 +560,9 @@
            'fileFd'     : fileFd
          }
      </call>
        </sequence>
      </else>
      </if>
      <call function="'writeEndTagOperation'">{'fileFd' : fileFd}</call>
      
      <return>cmdRC</return>