logback-android/src/main/java/ch/qos/logback/core/util/FileUtil.java
public static String prefixRelativePath(String prefix, String path) {
    if (prefix != null && !OptionHelper.isEmpty(prefix.trim()) && !new File(path).isAbsolute()) {
      path = prefix + "/" + path;
    }
    return path;
  }
public static String prefixRelativePath(String prefix, String path) {
    if (prefix != null && !OptionHelper.isEmpty(prefix.trim()) && !new File(path).isAbsolute()) {
      path = prefix + "/" + path;
    }
    return path;
  }
Prepends a string to a path if the path is relative. If the path
is already absolute, the same path is returned (nothing changed).
This is useful for converting relative paths to absolute ones,
given the absolute directory path as a prefix.

@param prefix string to prepend to the evaluated path if it's not
already absolute
@param path path to evaluate
@return path (prefixed if relative)