| | |
| | | while (true) |
| | | { |
| | | int bytesRead = inputStream.read(buffer); |
| | | if (bytesRead < 0) |
| | | if (bytesRead < 0 || backupConfig.isCancelled()) |
| | | { |
| | | break; |
| | | } |
| | |
| | | while (true) |
| | | { |
| | | int bytesRead = inputStream.read(buffer); |
| | | if (bytesRead < 0) |
| | | if (bytesRead < 0 || backupConfig.isCancelled()) |
| | | { |
| | | break; |
| | | } |
| | |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message, e); |
| | | } |
| | | |
| | | // Remove the backup if this operation was cancelled since the |
| | | // backup may be incomplete |
| | | if (backupConfig.isCancelled()) |
| | | { |
| | | removeBackup(backupDirectory, backupID); |
| | | } |
| | | |
| | | } |
| | | |
| | | |