private static @NlsSafe String toUserSystemFormat(String directory) {
    if (directory == null) {
      return "";
    }
    return directory.replace('/', File.separatorChar);
  }
private static @NlsSafe String toUserSystemFormat(String directory)