Merge pull request #3472 from dscho/expand-runtime-prefix

Re-do the path interpolation support regarding RUNTIME_PREFIX
This commit is contained in:
Johannes Schindelin
2021-10-15 15:12:48 +02:00
committed by Victoria Dye

6
path.c
View File

@@ -739,6 +739,12 @@ char *interpolate_path(const char *path, int real_home)
if (skip_prefix(path, "%(prefix)/", &path))
return system_path(path);
#ifdef __MINGW32__
if (path[0] == '/') {
warning(_("encountered old-style '%s' that should be '%%(prefix)%s'"), path, path);
return system_path(path + 1);
}
#endif
if (path[0] == '~') {
const char *first_slash = strchrnul(path, '/');
const char *username = path + 1;