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

Valery Kharseko
8 hours ago 069a1256c6ebdc1142e525a44733bc32fd834061
opendj-server-legacy/src/main/java/org/opends/server/backends/LDIFBackend.java
@@ -280,25 +280,13 @@
      throw new DirectoryException(DirectoryServer.getCoreConfigManager().getServerErrorResultCode(), m);
    }
    if (tempFile.exists())
    {
      // Rename the existing "live" file out of the way and move the new file
      // into place.
      try
      {
        oldFile.delete();
      }
      catch (Exception e)
      {
        logger.traceException(e);
      }
    }
    // Rename the existing "live" file out of the way and move the new file into place.
    // renameFile() deletes an existing ".old" file and reports a failure to do so.
    try
    {
      if (ldifFile.exists())
      {
        ldifFile.renameTo(oldFile);
        renameFile(ldifFile, oldFile);
      }
    }
    catch (Exception e)
@@ -308,7 +296,7 @@
    try
    {
      tempFile.renameTo(ldifFile);
      renameFile(tempFile, ldifFile);
    }
    catch (Exception e)
    {