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

Ludovic Poitou
17.30.2015 0b185e0dce0e4a160ea289dbdc03363f4860705b
OPENDJ-2439 - Check that file exists and is readable before running import task
2 files modified
6 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/messages/org/opends/messages/tool.properties 2 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
@@ -194,6 +194,10 @@
          s = f.getAbsolutePath();
        }
      }
      if (!f.canRead()) {
        LocalizableMessage message = ERR_LDIFIMPORT_LDIF_FILE_DOESNT_EXIST.get(s);
        throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
      }
      ldifFiles.add(s);
    }
opendj-server-legacy/src/messages/org/opends/messages/tool.properties
@@ -2691,6 +2691,8 @@
INFO_UPGRADE_TASK_DELETE_CHANGELOG_SUMMARY_10052=Removing content of changelog in '%s' directory.
INFO_UPGRADE_TASK_ENABLED_FILE_BASED_CHANGELOG_10053=Enable log file based replication changelog storage.
INFO_UPGRADE_TASK_DELETE_FILE_10054=Removing file '%s'
ERR_LDIFIMPORT_LDIF_FILE_DOESNT_EXIST_10055=Unable to access the LDIF file %s to import. Please check that the file is \
  local to the server and the path correct.
# Strings for generated reference documentation.
REF_SHORT_DESC_BACKUP_15000=back up OpenDJ directory data