Skip to content

Commit 7454610

Browse files
committed
Merge branch 'deprecate-old-runtime-prefix-path-interpolation'
Previously, we interpolated paths in config variables that start with a forward-slash as relative to the runtime prefix. This was not portable and has been replaced with `%(prefix)/`. Let's warn users when they use the now-deprecated form. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 5820315 + ecf4cd8 commit 7454610

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

path.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,12 @@ char *interpolate_path(const char *path, int real_home)
739739
if (skip_prefix(path, "%(prefix)/", &path))
740740
return system_path(path);
741741

742+
#ifdef __MINGW32__
743+
if (path[0] == '/') {
744+
warning(_("encountered old-style '%s' that should be '%%(prefix)/%s'"), path, path);
745+
return system_path(path + 1);
746+
}
747+
#endif
742748
if (path[0] == '~') {
743749
const char *first_slash = strchrnul(path, '/');
744750
const char *username = path + 1;

0 commit comments

Comments
 (0)