| | |
| | | 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) |
| | |
| | | |
| | | try |
| | | { |
| | | tempFile.renameTo(ldifFile); |
| | | renameFile(tempFile, ldifFile); |
| | | } |
| | | catch (Exception e) |
| | | { |