X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ffile-name.cc;h=c24c0731e4f237bccba2ac3dd1d0b8b450210a19;hb=94dc452301cc0d1e9983f5aeb784884f7fe8c964;hp=14812a034c39b87363c64d08372b0838750f6e8a;hpb=f93e4199873c91ae32f0e84a610d14853dc379df;p=lilypond.git diff --git a/flower/file-name.cc b/flower/file-name.cc index 14812a034c..c24c0731e4 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2012 Han-Wen Nienhuys Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify @@ -97,9 +97,8 @@ string get_working_directory () { char cwd[PATH_MAX]; - getcwd (cwd, PATH_MAX); - - return string (cwd); + // getcwd returns NULL upon a failure, contents of cwd would be undefined! + return string (getcwd (cwd, PATH_MAX)); } /* Join components to full file_name. */