- String build_prefix = prefix_directory + "/share/lilypond/" TOPLEVEL_VERSION;
- if (stat (build_prefix.to_str0 (), &statbuf) == 0)
- prefix_directory = build_prefix;
+ string build_prefix_current = prefix_directory + "/share/lilypond/" "current";
+ string build_prefix_version = prefix_directory + "/share/lilypond/" TOPLEVEL_VERSION;
+ if (stat (build_prefix_version.c_str (), &statbuf) == 0)
+ prefix_directory = build_prefix_version;
+ else if (stat (build_prefix_current.c_str (), &statbuf) == 0)
+ prefix_directory = build_prefix_current;