Skip to content

Commit 86814a0

Browse files
committed
mingw: deprecate old-style runtime-prefix handling in interpolate_path()
On Windows, an absolute POSIX path needs to be turned into a Windows one. We used to interpret paths starting with a single `/` as relative to the runtime-prefix, but now these need to be prefixed with `%(prefix)/`. Let's warn for now, but still handle it. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 787bfe4 commit 86814a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

path.c

+6
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)