X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Ffile-path.cc;h=513a146ad609823e2266f02a0ec1ab8c72f429d9;hb=51a7a5b1b0ebf04b7cefcaef899ef2229a6f2c2d;hp=3fc85000729af83694f6b4397d5b0111bb71586e;hpb=51805662a1a967b79469efe05a5a73ffa55fc5e8;p=lilypond.git diff --git a/flower/file-path.cc b/flower/file-path.cc index 3fc8500072..513a146ad6 100644 --- a/flower/file-path.cc +++ b/flower/file-path.cc @@ -3,14 +3,12 @@ source file of the Flower Library - (c) 1997--2006 Han-Wen Nienhuys + (c) 1997--2009 Han-Wen Nienhuys Jan Nieuwenhuizen */ #include "file-path.hh" -#include "std-string.hh" - #include #include @@ -66,6 +64,11 @@ is_file (string file_name) bool is_dir (string file_name) { + /* + canonicalize; in particular, trailing slashes should disappear. + */ + file_name = File_name (file_name).to_string (); + #if !STAT_MACROS_BROKEN struct stat sbuf; if (stat (file_name.c_str (), &sbuf) != 0)