X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frelocate.cc;h=fd6cf85c458f2fbac7dd76ae8c3bae1f8c8b3714;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=2ff9fc44d37e7721780bf791d07d4398ac588f1e;hpb=a3765e1d290e5e49093e7ca7791bf3fe20be1726;p=lilypond.git diff --git a/lily/relocate.cc b/lily/relocate.cc index 2ff9fc44d3..fd6cf85c45 100644 --- a/lily/relocate.cc +++ b/lily/relocate.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2005--2007 Han-Wen Nienhuys + (c) 2005--2008 Han-Wen Nienhuys */ @@ -230,12 +230,8 @@ setup_paths (char const *argv0_ptr) 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 @@ -245,6 +241,9 @@ setup_paths (char const *argv0_ptr) 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 (""); @@ -337,7 +336,7 @@ expand_environment_variables (string orig) return out; } - +// Ugh - very inefficient, but safer than fgets. static string read_line (FILE *f) { @@ -345,7 +344,7 @@ read_line (FILE *f) int c = 0; while ((c = fgetc (f)) != EOF && c != '\n') - out += c; + out += char(c); return out; }