X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ffile-name.cc;h=27ce6df6f8ef799193866636c6fceed86607fb54;hb=c5b1b714f0165cfb4f9d50411ac7525875f5fc59;hp=14812a034c39b87363c64d08372b0838750f6e8a;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/flower/file-name.cc b/flower/file-name.cc index 14812a034c..27ce6df6f8 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -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. */