private static String trimSlash(@NotNull String s) {
      if (WIN_DRIVE.matcher(s).matches()) {
        // No need to convert c:\ -> C:
        // Path.ancestor doens't work with it
        return s;
      }
      if (s.equals("/")) {
        return s;
      }
      return StringUtil.trimEnd(s, "/");
    }
private static String trimSlash(@NotNull String s)