if (char const *env = getenv ("LILYPOND_DATADIR"))
{
-#ifdef __MINGW32__
/* Normalize file name. */
lilypond_datadir = File_name (env).to_string ();
-#else
- lilypond_datadir = env;
-#endif
}
/* When running from build dir, a full LILYPOND_DATADIR is set-up at
if (!is_dir (lilypond_datadir.c_str ())
&& is_dir (build_datadir_current.c_str ()))
lilypond_datadir = build_datadir_current;
+
+
+ lilypond_datadir = File_name (lilypond_datadir).canonicalized().to_string();
global_path.append ("");
return out;
}
-
+// Ugh - very inefficient, but safer than fgets.
static string
read_line (FILE *f)
{
int c = 0;
while ((c = fgetc (f)) != EOF && c != '\n')
- out += c;
+ out += char(c);
return out;
}